How to open another web page from one web page

Hi, I am writing an asp.net(C#) 2.0 web page with a link to another web page by clicking a button control on the page, so how can I link it in the codes? I cannot access another aspx page class within the current aspx page class.

 Thanks

0
eddie
1/23/2008 12:11:27 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies
1750 Views

Similar Articles

[PageSpeed] 54

If you need to re-direct the user to another page after pressing your Button, then use the Response.Write method like so:

Response.Redirect("~/Default.aspx")


Thanks, Ed

Microsoft MVP - ASP/ASP.NET

0
ecbruck
1/23/2008 1:06:05 PM

1) Response.Redirect( "Destination PageName");

2) Response.Transfer("Destination PageName");

3) Hyperlink(  set Url="PageName" in Hyperlink)

4)Using Anchor 

5)  Using javascript  Windows.open

 

 

 


We Are Looking for .NET/PHP Projects

Contact Details :-

 Email - sameer.khanjit@gmail.com

 Mobile no. : +91-9893795983

 View Blog

linkedin Asp.net Group

Don't forget to click “Mark as Answer” on the post that helped you
0
sameer_khanjit
1/23/2008 1:08:49 PM

You can use Response.Redirect("String Url") ; where url is the url of the page you want to redirect


Regards,Vinz

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
0
vinz
1/23/2008 1:18:05 PM

 If you want to open it in a new window use the below code at page_load event

Button1.Attributes.Add("onclick","window.open('WebForm2.aspx');return false;");

 HC


Haissam Abdul Malak
MCAD.NET
| Blog |
0
Haissam
1/23/2008 3:43:12 PM
Reply:

Similar Artilces:

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one folder.like 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for this...help me. ..thanks  As i understand u, you need Multi Project soltuionsee this link, http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/archive/2006/02/19...

how to open a web page in form of a popup web page
Hello, I have two web pages, let say. Page A : With a Button on it. PAge B: with some info. Now I need to: When I click on the Button of page A.Page B must open in a pop up window.  I can do this but problem is this when I clicked on the button for first time it does not show me any thing and when I clicked on the button for second time then It shows me Page B .My code is as follow:  1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!this.Page.IsPostBack) 4 { 5 6 } 7 else 8...

Web page opens second web page, how does first page know when the second one closes?
I have an app written in ASP.NET where one of the web pages opens up a web page in a second window.  When this second web page closes, the first web page needs to update its data.  How do you do this? You can have the child window call a parent method when the user clicks a link to close it. Otherwise, you'd have to set up polling to check for the existence of the child, and refresh if it doesn't exist. Please Mark As Answer posts that helped you."If we learn from our mistakes, I should be brilliant by now." Thanks, this gives me part of the answer...

How to databind control in one web page from another web page
Hi all,  I have a listbox control and a button control in a web page. Once the user clicks the button another web page is opened. The new web page will accept some data from the user which will be used to databind the listbox in the first web page. In other words, the two web pages ( the parent window and the child window) are open at the same time. The child page needs to databind a control in the parent page. Is there a way to do it? I need some code. Thx in advance Update: I hate to do this. Looks like I will have to take help of viewstate and session si...

Is it possible to embed part of one web page into another web page?
Any answers will be highly appreciated.  Thanks. If you can adjust the page you want to embed onto the other page, you could use a .ascx (web forms control).  Then you can add controls to it and just drag and drop it using VS.NET from the Solution Explorer window to the webform.  You can then also embed it onto other pages in that same web project easily by drag n drop.  I hope this helps, it's not exactly a portion of a web page but may be an acceptable alternative for you.Rachel AppelMVP - ASPInsider In order to better answer this, I could use some details as ...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

link a web page to another web page?
I have a web page with my banner and buttons for my site on it. I want to add this to all of my pages. Instead of copying a pasting that to every page. Is there a way i can link the pages to the banner page? Thanx use ascx?:) Or you could create a template page. That is: Create a page inherited from System.Web.UI.Page and place your banner and buttons in this and then have all your other pages inherit tis custom page instead of System.Web.UI.Page. ...

i web page referencing another web page
Can one web page reference a control on another web page? EX. a page is brought up with a number of textbox controls. Using a hyperlink one can pop up a nother page with the calendar control. Select a date from the calendar control and place the value back in the previous page. Can this be done and how? Use a Page.RegisterClientScriptBlock to open a window, with a javascript string like this: "<script language=Javascript>window.open('my_url.aspx','window_name','left=100,top=100,width=200,height=500,toolbar=no,scrollbars=yes,resizable=yes');</script>" Then you can s...

All web pages hang on web server when one of the web pages calls a run away sql query
Hi: We have a Windows 2003 dedicated web server running the .NET Frameworks 1.0 and 2.0.  We have a SQL Server cluster running SQL Server 2000.  Unfortunately, we do not have a test environment.  I have 2 .NET web sites in production.  My coworker has a voting .NET web page using AJAX on the same server.  The coworker wrote a query that was not indexing properly and when the page fired the query...the cluster went to almost 100% utilization.  My two web pages would hang and show a blank white page on the default.aspx.  Neither of m...

how can you display another web site's web page in your web page without leaving your site
Can you display another web site's web page in your web page without leaving your site? I know you could use a frameset with .asp, but it looks like Visual Web Delevoper 2005 does not have any controls to setup a frameset. Any help, that would point me in the right direction would be great. Thanks Patrick     With screen scraping 4GuysFromRolla.Com: Screen Scrapes in ASP.NEThttp://www.4guysfromrolla.com/webtech/070601-1.shtmlThanks,Teemu KeiskiFinland, EU Thank you. This information was a great help!!! Thanks again Patrick...

diplay a web page into an area of another web page
How can I display a web page into an area of an other web page? I am using asp.net 2.0 and would like to avoid frames, but the functionality I need is just the one of a frame. Thanks Giancarlo Stinga You can use an iframe:http://www.mike-levin.com/iframes/ Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! DarrellNorton:http://www.mike-levin.com/iframes/ Wow!  Thanks for the extremely helpful link, Mr. MVP Moderator.  And we are supposed to look up to you guys...  Giancarlo: Here are some useful and releva...

activating new web page from another web page
Hello all. I'm trying to activate a web from from another web form. I meen, something like: public class RptReq : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { // Put user code to iniialize the page here Report rpt = new Report(); rpt.Page_Load(sender,e); } //Web Form Designer generated code } Report is another class in my name space. Can I get the right way to do it? Best regards to all. Shlomi <p><a target="_blank" href="sdfdf.asp">rdfgfdg</a></p> ...

Open web page in IE and populate fields on the form from my web form
To the dot net Knights.  Many humble thanks in advance from a dot net surf. We have an vb application that opens multiple instances of IE object, each to different web pages.  It then takes information from the current record in the app, populates fields on each of the web pages, and them submits the forms.  We are then able to look at the resulting web pages and quickly get the info we're looking for.This prevents us from having to manually navigate to each web site, enter the same information and then wait for the page to open.  If there is ...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Web resources about - How to open another web page from one web page - asp.net.web-forms

Marco Rubio Hammers Chris Christie Over Sotomayor Nomination
Marco Rubio’s rivalry with Chris Christie is escalating, with the first-term Senator from Florida on Friday using the New Jersey Governor’s own ...

You can get David Bowie's only video game for free until Jan. 22
David Bowie was perfectly cast in dual roles as an all-digital techno-revolutionary and a space-age rock star in Quantic Dream 's 1999 game, ...

Attorney files 'birther' lawsuit against Cruz
A Texas attorney has filed a lawsuit questioning Ted Cruz’s eligibility to serve as president. The federal case filed in Texas argues that the ...

Victoria Beckham approves of Adele and James Corden's take on 'Wannabe'
Posh has spoken. Victoria Beckham showed a rare glimpse of excitement on her Instagram account when she gave her verdict on Adele and James ...

Self-Driving Cars Are Rolling Closer to a U.S. Road Near You
Self-driving cars will get closer to appearing on American roads under a U.S. Transportation Department plan to speed their rollout. Regulators ...

Trial Date Set for Companies, Workers Charged in Gulf Blast
Judge sets trial date in criminal case against companies, workers in 2012 deadly oil platform explosion

An aerospace engineer explains how a 'Star Wars' X-wing could fly in real life
The X-wing fighter has been used by rebels (and now Resistance fighters) in the "Star Wars" franchise since the very beginning. Luke Skywalker ...

Two Colorado Teen Girls Plot Mass Shooting At Mountain Vista High School, Police Say
Two Colorado teen girls have been arrested for allegedly plotting a mass shooting at Mountain Vista High School in the Denver area. Brooke Higgins ...

After interviewing 'El Chapo,' Sean Penn says he isn't fearful for his life
Speaking to Charlie Rose in an interview for this Sunday's " 60 Minutes ," Sean Penn told the host how he felt that the Mexican government was ...

Netflix won’t keep letting proxy users access its catalog
On Jan. 6, Netflix announced global availability in more than 190 countries. Unfortunately, not all of Netflixs content is available in every ...

Resources last updated: 1/15/2016 5:11:04 PM