473,761 Members | 8,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3104
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.IsPostBa ck)
{
...
Button1.Attribu tes.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*****@altavi sta.comwrote in message
news:11******** *************@m 36g2000hse.goog legroups.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
2775
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" button. Therefore, I use Button bt_add = new Button(); bt_add.Text = "Add to cart"; and put it in a cell which is later placed in each table row. The Buttons display fine on the WebForm. However, I don't know how to add
2
2612
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 login information in it. Now when the user click the submit button then new popup window
9
2283
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
830
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 one will be focussed. so my application should detect that one, and it has to be pressed automatically.
1
1053
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 the user type 'enter' in the textbox? Thanks. bill
3
1172
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
1352
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 of the services that is being offered. I want that when a user makes selection of services in the checkboxlist control on form1, based on his selection of services he shall be redirected to the pages for selected services one by one in the order...
2
1886
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 am unable to drag the custom control on my webform. can u please tell what the problem is . i have provided the code below
4
2245
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", "window.open('http://www.softcircuits.com', null, 'height=250, width=250, status= no, resizable= no, scrollbars=no, toolbar=no, location=no, menubar=no');");
3
1837
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
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.