Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Equivalent to ".Show" in VS.NET webForm

Reply
Thread Tools

Equivalent to ".Show" in VS.NET webForm

 
 
Mike
Guest
Posts: n/a
 
      11-10-2004
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?
 
Reply With Quote
 
 
 
 
Ken Dopierala Jr.
Guest
Posts: n/a
 
      11-10-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?



 
Reply With Quote
 
 
 
 
John Timney \(Microsoft MVP\)
Guest
Posts: n/a
 
      11-10-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Another webform without closing the current webform ? Luqman ASP .Net 2 04-11-2007 02:43 AM
Moving value from popup Webform to main Webform? =?Utf-8?B?Vk1J?= ASP .Net 1 10-09-2006 05:15 PM
Using one webform to set a value on another webform =?Utf-8?B?bXN1aw==?= ASP .Net 1 07-12-2006 07:23 PM
no code in webform using vs.net, but in webform using notepad timmso ASP .Net 1 12-12-2003 04:30 PM
Including WebForm Image Control in a Webform Table Control titof ASP .Net 0 07-24-2003 01:01 PM



Advertisments