.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

i am a beginner

Posted By: ilakkiyaa     Posted Date: February 07, 2010    Points:2   Category :ASP.Net
how to move from one web form to another web form in asp.net using c#.
for eg:
in .net:

//button1_click()
{
form1 f= new form1();
f.show();
}//

this one i have used for window forms.but its not working in asp.net.....

Responses
Author: Akhil Raj       [Moderator]      
Posted Date: February 07, 2010     Points: 5   

please use...

Response.Redirect("~/form1"");

Author: Amit Mehra             
Posted Date: February 07, 2010     Points: 5   

Hi ilakkiyaa,

In Asp.Net using server side code you can redirect to another page in 2 ways

1) as Akhil is suggested

Response.Redirect("~/WebForm1.aspx");


2) Use Server.Transfer() method

Server.Transfer("~/WebForm1.aspx");


Thanks
Amit

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Deepika Haridas             
Posted Date: February 08, 2010     Points: 5   

For web forms you need to write
Response.Redirect("Your page url");




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend