How to open a web form with a button??

R

Rashrashetta

Hi all,

I am a beginner in using ASP.net, and I want to ask: If I have two
web-forms in the same project(Web-Application) and I want one of them
to open the another via a button? How can I do it? And what if I have
each one in a different project??? How can this be done?


Regards,
RASHRASHETTA
 
Y

Yash Talwar

just use response.redirect inside click event of button...or if u want both
to pages to remain open, then user href property of a hyperlink button
control.
 
J

Jeebu

hi,
this is very simple.
if u want to pass any data between first page to second page u can use
on the button click of first page add code Server.Transfer("Secondpage.aspx");

if u donot want to pass data but to display the page
Add code
Response.redirect("Secondpage.aspx");

if u want to open page residing on other project
specify the entire path
response.Redirect(http://localhost/project/webpage2.aspx");

cheers
jeebu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top