473,399 Members | 2,478 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,399 software developers and data experts.

Equivalent to ".Show" in VS.NET webForm

I am trying to call one webform from the click event of a button on
another webform. In VB6 windows applications, this is a simple
Form.Show, but I can't figure out the syntax to call Webforms. Can
anyone help with some sample code?
Nov 18 '05 #1
2 1548
Hi,

In the click event of your webform button do this:

Response.Redirect("NewWebPage.aspx")

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Mike" <gr******@comcast.net> wrote in message
news:a0**************************@posting.google.c om...
I am trying to call one webform from the click event of a button on
another webform. In VB6 windows applications, this is a simple
Form.Show, but I can't figure out the syntax to call Webforms. Can
anyone help with some sample code?

Nov 18 '05 #2
You want window.open

<html>
<head>
<script language="VB" runat="server">

Sub Page_Load( sender as Object,e as EventArgs)

'Form the script that is to be registered at client side.
Dim scriptString as String = "<script language=JavaScript> function
DoClick() {"
ScriptString +=
"window.open('http://www.mvps.org','MyWindow','width=500,height=500');} <"
scriptString += "/"
scriptString += "script>"

If(Not IsClientScriptBlockRegistered("clientScript"))
RegisterClientScriptBlock("clientScript", scriptString)
End If
End Sub
</script>
</head>
<body topmargin="20" leftmargin="10">
<form id="myForm" runat="server">

<INPUT id="launchButton" onclick="DoClick();" type="button"
value="Submit" name="myButton" runat="server">

</form>
</body>
</html>

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Mike" <gr******@comcast.net> wrote in message
news:a0**************************@posting.google.c om...
I am trying to call one webform from the click event of a button on
another webform. In VB6 windows applications, this is a simple
Form.Show, but I can't figure out the syntax to call Webforms. Can
anyone help with some sample code?

Nov 18 '05 #3

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

Similar topics

1
by: Ahmad Noori | last post by:
I have a form and in the form, I have a drop down box. Based on what the user selects, i want to display different input boxes. Here is my drop down box: <td> <select name="reptype"...
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
2
by: VB Programmer | last post by:
I created a VB6 user control with a ActiveX Knob on it. Here's the simple code: Public Property Get Value() As Integer Value = CWKnob.Value End Property Public Property Let Value(Value As...
6
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have...
1
by: Darin | last post by:
I have many forms in an MDI application. Sometimes I show FORMA just by a f.Show, other times it is f.ShowDialog. How can I tell within the form code whether this form is shown via Show or...
0
by: Michel Couche | last post by:
Hello, I use a datalist to display the results of a search in a database of wines. One of the fields contains a full decsription of the wines. When a visitor makes a search, the results are...
3
by: Lord0 | last post by:
Hi there, First of all I apologise for being a PHP noob. Is there a PHP equivalent of Java's Jasper Reports? http://jasperforge.org/sf/projects/jasperreports Basically Jasper is a bunch...
0
by: Curious | last post by:
Hi, I used MessageBox.Show method to show message boxes to alert about issues. However, it seems that they're always minimized at the bottom of the screen. Is there anyway I can make them...
1
by: tskrish | last post by:
Hi, I'm looking for the VB 6 equivalent "GET" in C#. I have a DAT file in binary format." I can read the file using "BinaryReader class - Read...() Method" but the problem is I need a proper...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.