•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,515 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,713 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2807 | Replies: 2
![]() |
•
•
Join Date: Sep 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
This is an example of Inserting and Retrieving data from xml file.
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if(!IsPostBack)
{
BindGrid();
}
}
private void BindGrid()
{
ds = new DataSet();
try
{
ds.ReadXml(@"c:\inetpub\wwwroot\WebApplication10\XMLFile1.xml");
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
}
catch(Exception ex)
{
throw ex;
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
ds = new DataSet();
try
{
ds.ReadXml(@"c:\inetpub\wwwroot\WebApplication10\XMLFile1.xml");
DataRow row = ds.Tables[0].NewRow();
row["name"]=txtName.Text;
row["fathersname"]=txtFName.Text;
row["address"]=txtAddress.Text;
ds.Tables[0].Rows.Add(row);
ds.WriteXml(@"c:\inetpub\wwwroot\WebApplication10\XMLFile1.xml");
txtAddress.Text="";
txtFName.Text="";
txtName.Text ="";
BindGrid();
}
catch(Exception ex)
{
throw ex;
} Last edited by stymiee : Sep 29th, 2007 at 2:01 pm. Reason: url removed
•
•
Join Date: Mar 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
hello hanusoft,
i have been trying to insert data from my project which i m doing using asp.net and the language is c#.
i have tried ur code.
it has given 4 errors.
Error 1
'ASP.default_aspx.GetTypeHashCode()': no suitable method found to override
the file where the error occurs
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\firstasp\2e57531e\
3fdfeee\App_Web_komf0cr-.2.cs
the rest of the problem occurs in the same file.
can u tell me what is the wrong with here?
i have been trying to insert data from my project which i m doing using asp.net and the language is c#.
i have tried ur code.
it has given 4 errors.
Error 1
'ASP.default_aspx.GetTypeHashCode()': no suitable method found to override
the file where the error occurs
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\firstasp\2e57531e\
3fdfeee\App_Web_komf0cr-.2.cs
the rest of the problem occurs in the same file.
can u tell me what is the wrong with here?
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net access ajax api asp blogger blogging breach broadband code combo crime custom data data protection data transfer development dom dropdownlist forensics gdata google government hardware hitachi html internet linspire linux microsoft module net news openoffice programming reader reuse rss security skin sql standards storage theme w3c web wikipedia windows workflow xml xoap
- Read XML File in C/C++ (C++)
- [urgent] HTML form => XML file (JSP)
- Listview Data to XML or file (VB.NET)
- how can i extract data from .xml file? (Visual Basic 4 / 5 / 6)
- Displayind data in XML file using HTML (RSS, Web Services and SOAP)
- How to re-organized XML file and call XML file from my software (RSS, Web Services and SOAP)
- append to XML file (Visual Basic 4 / 5 / 6)
- saving xml file from servlet request instance (Java)
- problem reading xml file in c# (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: onclick=window.closw()is not working in mozilla firefox...
- Next Thread: Searching MY DB Records with .NET


Linear Mode