A
Alex
Hi
I'm a beginner in ASP.NET.
I'm using 'AddContact.aspx' form to add a contact to DB, 'litStatus' literal
to show the result and Server.Transfer to clear inputs in the form.
The problem is i don't see the status message. The example is from a book
about ASP.NET.
Am i doing something wrong? If the code is wrong how can i clear the
textboxes and show the status?
Thanks.
try
{
adptContacts.Update(dsContacts);
litStatus.Text = rowNew.FirstName + " " + rowNew.LastName + " added
successfully";
Server.Transfer("AddContact.aspx");
}
catch (Exception Ex)
{
litStatus.Text = "Error occurred: " + Ex.Message;
}
I'm a beginner in ASP.NET.
I'm using 'AddContact.aspx' form to add a contact to DB, 'litStatus' literal
to show the result and Server.Transfer to clear inputs in the form.
The problem is i don't see the status message. The example is from a book
about ASP.NET.
Am i doing something wrong? If the code is wrong how can i clear the
textboxes and show the status?
Thanks.
try
{
adptContacts.Update(dsContacts);
litStatus.Text = rowNew.FirstName + " " + rowNew.LastName + " added
successfully";
Server.Transfer("AddContact.aspx");
}
catch (Exception Ex)
{
litStatus.Text = "Error occurred: " + Ex.Message;
}