473,386 Members | 1,823 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,386 software developers and data experts.

ASP.NET button that calls another webform in a pop-up --- please help!!

Hi everyone,
I have an APS.NET (v1.1) type button on a webform page. What I want
it to do is when the user clicks it, it then calls another webform
page that appears in a pop-up window.
Now I know that the button has an "onclick" attribute but that's as
far as I get. I guess you need some Javascript and something in the
code behind file (which for me is VB.NET) but I don't know what.

Can anyone out there help me please? I would appreciate any code-
samples/suggestions/comments that anyone has to offer. Any advice much
appreciated...

Thanks,
Al.

Jul 6 '07 #1
1 3094
Probably you have already know you can only open a new browser window with
client side script (Java/JScript). Yes, you only need to attach a piece of
javascript to open a new window that calling another webform/page. Here is
an example:

private void Page_Load(....)
{
if (!Page.IsPostBack)
{
...
Button1.Attributes.Add("onlick","window.open('http ://www.thesite.com/thepage.aspx','New
Window');return false;")
}

...
}

if you still want the button click causes post back, you can remove "return
false;" part.
<al*****@altavista.comwrote in message
news:11*********************@m36g2000hse.googlegro ups.com...
Hi everyone,
I have an APS.NET (v1.1) type button on a webform page. What I want
it to do is when the user clicks it, it then calls another webform
page that appears in a pop-up window.
Now I know that the button has an "onclick" attribute but that's as
far as I get. I guess you need some Javascript and something in the
code behind file (which for me is VB.NET) but I don't know what.

Can anyone out there help me please? I would appreciate any code-
samples/suggestions/comments that anyone has to offer. Any advice much
appreciated...

Thanks,
Al.

Jul 6 '07 #2

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

Similar topics

1
by: teddy | last post by:
I am trying to create a bookstore WebApplication using c#. I can display the books (obtained from sql server) on a table in a WebForm. At the end of each row, I would like to add "add to cart"...
2
by: yatharth | last post by:
I am facing a problem ,the situation is like this. I have a home page named "Index.html" ,on which there is login link,when i click on the login link the login popup opens and user enter the...
9
by: trint | last post by:
Ok, How can I NOT show the "titlebar" or the "border" at all on a webform (I have a transparent gif as the edges)? Thanks, Trint
0
by: kumar | last post by:
hai, i have a small problem regarding the focussed button. i have an application. in that application i will call some exe. so that a pop will be appear with two buttons. in those 2 buttons...
1
by: bill | last post by:
There are two buttons and a textbox in a webform page. I want to store the text in textbox to the database when the user type 'enter' in the textbox. How to make the button2_click event fired when...
3
by: No one | last post by:
Is there a way to control which button in a webform is the default for when a user hits the enter key? I need it to not be the first button, which is what seems to happen now. Thanks.
4
by: Saket Mundra | last post by:
I am designing a web application to offer services to customers. In form1 I have listed all the services available using CheckBoxlist control. I have a different webform for customization of each...
2
by: prasadrmarathe | last post by:
Hi, I have created one custom buton server control which will shown on it the nuber of time it was clicked as its text. I have added the custom control in my another projects tool box but i...
4
by: Jonathan Wood | last post by:
Greetings, I'm new to ASP.NET and am trying to figure out how to popup a help window. I was able to get the following code to work: helpButton1.Attributes.Add("onclick",...
3
by: tess | last post by:
We are coding a popup window on exit of our site. We do not want this popup to occur if someone hits the back button. How do we stop this. Any hints?
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.