By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

Open a new web page in a web form? Please help!!

P: n/a
Hi All,

How I can open a new web page in a web form?

I know response.redirect("...aspx") will re-direct the current page to another.
However, what I want is to remain the current page unchange and by clicking
a button on current form to open a new web page.

Any assistance is highly appreciate.

Cheers

Larry

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Opening a new window is a client side operation and not directly
controllable from the server. You'll have to have your page emit some
javascript that calls window.open(). You can use the
Page.RegisterStartupScript() or Page.RegisterScriptBlock() methods to easily
accomplish this. I've provided the links to the MSDN documentation for easy
reference.

http://msdn.microsoft.com/library/de...cripttopic.asp

http://msdn.microsoft.com/library/de...blocktopic.asp

--
HTH
----------------
Dave Fancher
http://davefancher.blogspot.com

"Larry" <la***@widextech.com> wrote in message
news:38********************@news.microsoft.com...
Hi All,

How I can open a new web page in a web form?

I know response.redirect("...aspx") will re-direct the current page to
another. However, what I want is to remain the current page unchange and
by clicking a button on current form to open a new web page.

Any assistance is highly appreciate.

Cheers

Larry

Nov 21 '05 #2

P: n/a
Larry,

Have you thought what you want to do with that extra page?

Often is creating a textbox on the currentpage the goal that is wanted to be
achieved when people ask this question.

(Use panels that you make visible and invisible for that).

And that is much easier to do.

Cor
Nov 21 '05 #3

P: n/a

Larry wrote:
Hi All,

How I can open a new web page in a web form?

I know response.redirect("...aspx") will re-direct the current page to another. However, what I want is to remain the current page unchange and by clicking a button on current form to open a new web page.

Any assistance is highly appreciate.


<form runat="server" id="myForm" target="_blank"> should work.

If you don't want to open new pages for all buttons' clicks, you will
need javascript to change myForm's target at client-side.

Nov 21 '05 #4

P: n/a
Hi,

Another option is to convert the aspx page to a control and add the
control to a panel.

http://msdn.microsoft.com/library/de...sercontrol.asp

Ken
------------------------
"Larry" <la***@widextech.com> wrote in message
news:38********************@news.microsoft.com...
Hi All,

How I can open a new web page in a web form?

I know response.redirect("...aspx") will re-direct the current page to
another.
However, what I want is to remain the current page unchange and by clicking
a button on current form to open a new web page.

Any assistance is highly appreciate.

Cheers

Larry


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.