473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Buttons, Textboxs and hyperlinks

could anybody help me out with some code.. basically what
i need is that when a user presses a Web Button the
browser will open a new window for the url they typed in
or was already present in TextBox1.

Im using VisualStudios.NET 2003 c#

thanks

Tom
Nov 15 '05 #1
1 1344
You'd need javascript for that. Consider Button1 click event
Response.Write("<script>window.open('newpagehere.a spx','arbitrarywindowname'
)</script>");
window.open takes a bunch of parameters to help you customize the look and
feel of the child window.

If you supply a window name, the child window will always use this window so
you can have at most one child window. If you want to generate new windows
on each click you have to make the window name unique. You can use the
following code to get the desired effect.

Page.Controls.Add(new LiteralControl("<script>window.open('Export.aspx',
'"+System.Text.RegularExpressions.Regex.Replace(Da teTime.Now.ToString(),"\\D
","")+"', 'toolbar=no,scrollbars=yes,width=" + width + ",height=" + height +
",resizable=yes')</script>"));

Page.Controls.Add and Response.Write provide the same effect here and can be
merily interchanged without side effect.

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits

"Tom Rebbettes" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
could anybody help me out with some code.. basically what
i need is that when a user presses a Web Button the
browser will open a new window for the url they typed in
or was already present in TextBox1.

Im using VisualStudios.NET 2003 c#

thanks

Tom

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JC | last post by:
Greetings all. I would like to know how to make a textboxs height = the height of the cell it's in minus 10 px or what ever number.. Using 90% for height does not work as I need it to be exactly...
1
by: Lily | last post by:
Hi there, I have 10 textboxs on a page. When tab into a textbox, the entire text ($0.00) in a textbox is selected in blue. How do I have this effect by single clicking on the textbox?
4
by: netnews.comcast.net | last post by:
I am wondering what the best way to have a button on a webform open in a new browser window. I have a webform with a ComponentOne report on it, and I want to export to excel, but when they click...
5
by: Irfan Akram | last post by:
Hi Guys, I've got a simple question for all of you guys. I have just noticed that I have alot of buttons on my screen. Is there any that those buttons be replaced by anything more sophisticated...
0
by: phil-news-nospam | last post by:
I was experimenting with buttons in HTML/CSS and encountered some strange behaviour when changing the padding property setting in the stylesheet. Maybe it's not a stylesheet issue, but since that's...
0
by: hime | last post by:
hi all; I have a web form to enter data in my table i am trying to add a Next & previous buttons but it's not working am using (.Net C# and MySql DB). and in the form I used textboxs to show the...
4
by: jonny | last post by:
I would like to add a password and user name to my website. If the username and password is correct than activate the hyperlinks and buttons. Could you please share some code how how to achieve...
2
by: kethireddy | last post by:
Hi .This is Aruna..Am working on ASP...Now am facing on a problem.. In the asp form i took 5 textboxs and one search button...when a write record name in a last textbox from database and click...
2
by: lilOlMe | last post by:
Hi there! I'm developing an ASP.NET application. I'm making use of a LinkButton Object to post my forum to the server. The LinkButton is converted into a hyperlink once it is rendered as HTML...
0
by: ganesh22 | last post by:
Hi Iam using below code for creating dynamically textboxs bt the below code is creating only one vertical row for textboxs now i want 3 vertical rows can u give a code?? using...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.