narayana_anthati Posted October 11, 2006 Share Posted October 11, 2006 hai when i am udating data i am facing Error executing child request for Registartion Compleate.But the data is updating.Can any body rectify my problem.code is:public partial class Usersupdate : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } } protected void Button2_Click(object sender, EventArgs e) { tb1.Text = ""; tb2.Text = ""; tb3.Text = ""; tb4.Text = ""; tb5.Text = ""; tb6.Text = ""; tb7.Text = ""; tb8.Text = ""; tb9.Text = ""; tb10.Text = ""; } protected void Button1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=sankhya03;Initial Catalog=OmArtPrint;Integrated Security=True"); //Dim con As New SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings("Connection")); SqlCommand cmd=new SqlCommand() ; cmd.Connection = conn; try { cmd.CommandText ="update login set pwd='"+tb2 .Text +"',title='"+ddl1 .Text +"' , firstname='"+tb3.Text +"' , lastname='"+tb4.Text +"' , phone='"+tb5.Text +"' , email='"+tb6.Text +"' , address='"+tb7.Text +"' , city='"+tb8.Text +"' , state='"+tb9.Text +"' , postal='"+tb10.Text +"' , howuheard='"+ddl2 .Text +"' where username='"+tb1.Text +"'"; conn.Open(); cmd.ExecuteNonQuery(); tb1.Text = ""; tb2.Text = ""; tb3.Text = ""; tb4.Text = ""; tb5.Text = ""; tb6.Text = ""; tb7.Text = ""; tb8.Text = ""; tb9.Text = ""; tb10.Text = ""; Server.Transfer("Registartion Compleate"); conn.Close(); } catch(Exception ex) { Response.Write(ex.Message.ToString ()); }} Link to comment Share on other sites More sharing options...
aspnetguy Posted October 11, 2006 Share Posted October 11, 2006 the errror is with this lineServer.Transfer("Registartion Compleate");You must specify a page to Transfer to...it is not for displaying messages.Server.Transfer works similarly to Response.Redirect with some performance diffrences. Link to comment Share on other sites More sharing options...
narayana_anthati Posted October 11, 2006 Author Share Posted October 11, 2006 the errror is with this lineServer.Transfer("Registartion Compleate");You must specify a page to Transfer to...it is not for displaying messages.Server.Transfer works similarly to Response.Redirect with some performance diffrences.Thanks for u reply now its workingRegardsnarayana Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now