How can I save the content of an xml file to a database( in field which has an XML type)
should I read the content of file with i.e:
FileUpload1.FileContent;
and then send it as a parameter to save in Database? Is it correct?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to first save it to the Server hard disk and then get the
InnerXMLof that to a string variable and then save it to the database.Assuming you saved the file to some folder in your disk, you can use the below method (using LINQtoXML) to read the content