Sir saving data has done, it is saved the link in the db. but while retrieving the photo doesn't show???, i mean photo does contain in the folder babypic also.
Thanks for your valuable feedback to us as query. Kindly share your project example snapshot with database and coding through email address. We will review it and reply you with proper solution. Keep visiting our channel for more updated videos.
How to compare system time to a specific time. I want to desable asp.net button after 6.00 pm and automatically enable after next day morning 6.00 am automatically in my website
Thanks for your valuable feedback to us as query. We have noted down your requested example and will definitely try to implement it as video tutorial on our channel in upcoming days. Keep visiting our channel for more updated videos.
hello sir ......i am getting error about syntax...plz sir help me out the error is.. An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code Additional information: Incorrect syntax near 'images/charitable-contributions.png'.
Hello Hariti, I am getting a syntax error near cmd.ExecuteNonQuery(); and have no idea.....i have been trying to get this functionality to work for ever please help! :) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.IO; public partial class Products : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string constring = "Data Source=SONY-VAIO;Initial Catalog=ArtTrader;Integrated Security=True"; SqlConnection sqlcon = new SqlConnection(constring); FileUpload1.SaveAs(Server.MapPath("~/Pics/")); Path.GetFileName(FileUpload1.FileName); String link = "Pics" + Path.GetFileName(FileUpload1.FileName); String query = "insert into Pics(Name, Description,Size, QtyAvailable, Price, ArtistEmail,Image) values(" + TextBox1.Text + ".'" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + link + "')"; SqlCommand cmd = new SqlCommand(query, sqlcon); sqlcon.Open(); cmd.ExecuteNonQuery(); sqlcon.Close(); Label8.Text = "Upload Successful"; TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = "";
Thanks for your valuable feedback to us. Kindly check your data source name with proper sql server name. It will works 100% sure. Keep visiting our channel for more updated videos.
Hi sir hum image upload karti hain ager image same name ke upload karo tu image ek hai hoti hai folder m or data save ho jati hai mera mtlb ke ek hai name ke image kase upload hogi..?
Thanks for your valuable feedback to us as query. Kindly check carefully your image path so it will definitely show properly. Send your code through our email so we could review it and reply you back with proper solution. Keep visiting our channel for more updated videos.
Thanks for your valuable feedback to us as query. Yes its problem with this code. We will modify it for upload same name image on server without deleting old one. We will definitely try to implement your requested example as video tutorial on our channel in upcoming days. Keep visiting our channel for more updated videos.
sir i m not using management studio i m working on mssql database so i m facing some errors fileupload ka path jo apne dala hai fileupload1.saveas(server.mappath("~/babypic/")) so sir meri query ye hai ki ye jo aapne management studio ka path diya hai agar hum vo use nai kar rahe hai hum mssql use kar rahe hai to kaunsa path dena hai please sir reply fat its an emergency
Thanks for your valuable feedback to us as query. We want to inform you that your folder name created in server folder should be same as name used in database table. Kindly check it again for folder name where photos will be saved.
Hi Bro.. I am getting below error.. Please help me out.. ERROR: System.Data.SqlClient.SqlException: 'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)' using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.IO; namespace UPLOADIMAGE_in_DATABASE_and_DISPLAY_IMAGE_from_DATABASE__into_GRIDVIEW { public partial class NEWADMISSION : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { SqlConnection CON = new SqlConnection("Data Source=VEERA;Initial Catalog=BABYDATABASE;User ID=sa;Password=12345"); FileUpload1.SaveAs(Server.MapPath("~/IMAGES/") + Path.GetFileName(FileUpload1.FileName)); string link = "IMAGES/" + Path.GetFileName(FileUpload1.FileName); string query = "Insert into BABYDETAILS(BABYID,BABYNAME,BABYLOCATION,FATHERNAME,BABYPICTURE) values( " + TextBox1.Text + ",'" + TextBox2.Text + ",'" + TextBox3.Text + ",'" + link + "')"; SqlCommand CMD = new SqlCommand(query, CON); CON.Open(); CMD.ExecuteNonQuery(); CON.Close(); Label1.Text = "Data Submitted Succesfully"; TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; } } }
Thank You so much 💌 , Very usefull for my final Exams
Welcome…Glad to here this.
Welcome. Nice to hear this
Usefull 🎉
Thanks
Thank you so much 👍
Thanks.
Thank you so much you helped to solve a big problem. Learned new method
Glad it helped
thanks man 👌👌👌
Welcome
Your videos are truly helpful sir..... accurate n easy to understand...tysm sir
+Neelam Pal Thanks Neelam, For Sharing Your Valuable Feedback to Us. keep visiting Channel For More Updates.
My grid view table is not displaying
Thanks You so much..it worked
Thanks for your valuable feedback to us. Keep visiting our channel for more updated videos.
God bless
Thanks.
nice work specially for ASP.Net plz making videos on mvc
Thanks Waseem For Sharing Your Valuable Feedback to Us. We will Start MVC related Video Tutorial Series Soon on Our Channel.
Sir saving data has done, it is saved the link in the db. but while retrieving the photo doesn't show???, i mean photo does contain in the folder babypic also.
Thanks for your valuable feedback to us as query. Kindly share your project example snapshot with database and coding through email address. We will review it and reply you with proper solution. Keep visiting our channel for more updated videos.
Can we use data type as image
How to compare system time to a specific time. I want to desable asp.net button after 6.00 pm and automatically enable after next day morning 6.00 am automatically in my website
Thanks for your valuable feedback to us as query. We have noted down your requested example and will definitely try to implement it as video tutorial on our channel in upcoming days. Keep visiting our channel for more updated videos.
yes Sir "Save Day Uty Coding karty hain" :D
hello sir ......i am getting error about syntax...plz sir help me out
the error is..
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code
Additional information: Incorrect syntax near 'images/charitable-contributions.png'.
Editor konsa use kiya h...???
+Rohit Kandare visual studio 2010
Ok sir..
Hello Hariti,
I am getting a syntax error near cmd.ExecuteNonQuery(); and have no idea.....i have been trying to get this functionality to work for ever please help! :)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.IO;
public partial class Products : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string constring = "Data Source=SONY-VAIO;Initial Catalog=ArtTrader;Integrated Security=True";
SqlConnection sqlcon = new SqlConnection(constring);
FileUpload1.SaveAs(Server.MapPath("~/Pics/")); Path.GetFileName(FileUpload1.FileName);
String link = "Pics" + Path.GetFileName(FileUpload1.FileName);
String query = "insert into Pics(Name, Description,Size, QtyAvailable, Price, ArtistEmail,Image) values(" + TextBox1.Text + ".'" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + link + "')";
SqlCommand cmd = new SqlCommand(query, sqlcon);
sqlcon.Open();
cmd.ExecuteNonQuery();
sqlcon.Close();
Label8.Text = "Upload Successful";
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
}
}
i am getting a error saying network path is not found with this 'sqlcon.Open();'...!!!
Thanks for your valuable feedback to us. Kindly check your data source name with proper sql server name. It will works 100% sure. Keep visiting our channel for more updated videos.
@@HaritiStudyHubEasyLearn thanks sir same problem comes with me
i am getting error for this
Invalid column name 'h'.
The multi-part identifier "ratingStarFilled.gif" could not be bound.
+Vikash Joshi can u send the snapshot of error with ur code to our email address.
Hi sir hum image upload karti hain ager image same name ke upload karo tu image ek hai hoti hai folder m or data save ho jati hai mera mtlb ke ek hai name ke image kase upload hogi..?
I have the same problem
grid me data backend coding k thoroug kese dekha skty hen?
hey is there any way you can help me
Send us your query, we are always here to help in programming.
daynamic view banana he to keshe hoga tables meshe
Sir mai kaise source code download kare
Buy our 49/- coding pack link in description.
not able to display the image just the image icon display
Any advise?
Thanks for your valuable feedback to us as query. Kindly check carefully your image path so it will definitely show properly. Send your code through our email so we could review it and reply you back with proper solution. Keep visiting our channel for more updated videos.
Sir, nice video. But when we upload 2 images having same name, the second one replaces the first one. Plz send the solution.
Thanks for your valuable feedback to us as query. Yes its problem with this code. We will modify it for upload same name image on server without deleting old one. We will definitely try to implement your requested example as video tutorial on our channel in upcoming days. Keep visiting our channel for more updated videos.
Sir database me images ki size alag alag he usko same size kese kre
sir i m not using management studio
i m working on mssql database so i m facing some errors
fileupload ka path jo apne dala hai fileupload1.saveas(server.mappath("~/babypic/"))
so sir meri query ye hai ki ye jo aapne management studio ka path diya hai agar hum vo use nai kar rahe hai hum mssql use kar rahe hai to kaunsa path dena hai please sir reply fat its an emergency
Thanks for your valuable feedback to us as query. We want to inform you that your folder name created in server folder should be same as name used in database table. Kindly check it again for folder name where photos will be saved.
sir news website ke bare me bataaye , bahut bahut dhanyawad
how to set image size in this project?
how to find virtual path?
How to configure the height and width of the image?
Design phase properties width and height
Hello sir MVC zero banaye
Hi Bro.. I am getting below error.. Please help me out..
ERROR:
System.Data.SqlClient.SqlException: 'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)'
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.IO;
namespace UPLOADIMAGE_in_DATABASE_and_DISPLAY_IMAGE_from_DATABASE__into_GRIDVIEW
{
public partial class NEWADMISSION : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection CON = new SqlConnection("Data Source=VEERA;Initial Catalog=BABYDATABASE;User ID=sa;Password=12345");
FileUpload1.SaveAs(Server.MapPath("~/IMAGES/") + Path.GetFileName(FileUpload1.FileName));
string link = "IMAGES/" + Path.GetFileName(FileUpload1.FileName);
string query = "Insert into BABYDETAILS(BABYID,BABYNAME,BABYLOCATION,FATHERNAME,BABYPICTURE) values( " + TextBox1.Text + ",'" + TextBox2.Text + ",'" + TextBox3.Text + ",'" + link + "')";
SqlCommand CMD = new SqlCommand(query, CON);
CON.Open();
CMD.ExecuteNonQuery();
CON.Close();
Label1.Text = "Data Submitted Succesfully";
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
}
}
}
not working
Kindly share your error or problem, so we can guide you how to make it working.
The screen is not bright enough
Coding acche se samjhaya karo for beginners
Due to time limitations, We try to explain in short but definitely try to explain each bit of code in upcoming videos.
I need code free please