Can you tell me what wrong with my code..
[WebMethod]
[ScriptMethod]
public static void InsertWebService(check c)
{
HttpPostedFile postedFile= c.photo;
string fileName = System.IO.Path.GetFileName(postedFile.FileName);
//Set the Image File Path.
string filePath = "~/check/" + fileName;
//Save the Image File in Folder.
postedFile.SaveAs(HttpContext.Current.Server.MapPath(filePath));
//performing normal insert query ..
Connection con = new Connection();
SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
conn = con.getConnection();
try
{
conn.Open();
query = "";
// Query written
}//close finally
AJAX call..
student.photo = $('#photo').val(), // I need to know if i can send the path like this.. this gives c:\fakepath\fileuploaded.jpg
//normal call to web service
can you tell what is going wrong