Does anyone know how I can open a webform using vb.net? I know how to do it
with Windows Forms in vb.net, but the .Show method is unavailable in WebFor
ms in vb.net.
Thank you!!!On Wed, 7 Jul 2004 10:06:01 -0700, Justin
<Justin@.discussions.microsoft.com> wrote:
> Does anyone know how I can open a webform using vb.net? I know how to
> do it with Windows Forms in vb.net, but the .Show method is unavailable
> in WebForms in vb.net.
> Thank you!!!
You may want to review the ASP.NET QuickStart tutorials, all of them, if
you haven't done Internet based apps before. Have you done ASP before,
etc? If not, things like state management will be other things you'll hit
(how to pass values to a page, etc.).
For the quick answer (or if you already know all this):
http://samples.gotdotnet.com/quicks...erverctrls.aspx
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
"Justin" <Justin@.discussions.microsoft.com> wrote in message
news:DEDB84FD-1EA9-4B5F-8258-26FDBC3392AB@.microsoft.com...
> Does anyone know how I can open a webform using vb.net? I know how to do
it with Windows Forms in vb.net, but the .Show method is unavailable in
WebForms in vb.net.
It just doesn't work that way in .aspx - remember, you're dealing with web
pages now. Instead what you do is work the flow of your application off of
the application's default web page (usually default.aspx). You can
programmatically control the flow of pages off of your default page by using
the Server.Transfer(pageName) or Response.Redirect(pageName) methods, (as
part of your button_click events or whatever.)
If you want something akin to a modal dialog box to pop up, you'd have to
come up with some JavaScript to do that, and run it as client code.
R.
If you want to open a totally new window you can use client side javascript
such as this:
window.open('MyPage.aspx','_blank')
There are all kinds of options for setting window properties such as window
size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/...hods/open_0.asp
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Justin" <Justin@.discussions.microsoft.com> wrote in message
news:DEDB84FD-1EA9-4B5F-8258-26FDBC3392AB@.microsoft.com...
> Does anyone know how I can open a webform using vb.net? I know how to do
it with Windows Forms in vb.net, but the .Show method is unavailable in
WebForms in vb.net.
> Thank you!!!
Thank you. I used the Response.Redirect method and it is opening my webform
for me. But, it is not showing all the controls as they should be. I have
text boxes that are now showing up and the labels are in the wrong area of
the screen. Is there anoth
er command I should use to set everything straight?
Thanks again!
"Richard K Bethell" wrote:
> "Justin" <Justin@.discussions.microsoft.com> wrote in message
> news:DEDB84FD-1EA9-4B5F-8258-26FDBC3392AB@.microsoft.com...
> it with Windows Forms in vb.net, but the .Show method is unavailable in
> WebForms in vb.net.
>
> It just doesn't work that way in .aspx - remember, you're dealing with web
> pages now. Instead what you do is work the flow of your application off of
> the application's default web page (usually default.aspx). You can
> programmatically control the flow of pages off of your default page by usi
ng
> the Server.Transfer(pageName) or Response.Redirect(pageName) methods, (as
> part of your button_click events or whatever.)
> If you want something akin to a modal dialog box to pop up, you'd have to
> come up with some JavaScript to do that, and run it as client code.
> R.
>
>
Actually, I answered my own question. I was using...
Response.Redirect(" C:\Inetpub\wwwroot\LeasingDatabase\EditL
ease.aspx")
...when I should have been using...
Response.Redirect("EditLease.aspx")
Thank you for all of your help!!!!
"Steve C. Orr [MVP, MCSD]" wrote:
> If you want to open a totally new window you can use client side javascrip
t
> such as this:
> window.open('MyPage.aspx','_blank')
> There are all kinds of options for setting window properties such as windo
w
> size and toolbar visibility.
> Here's more info:
> http://msdn.microsoft.com/workshop/...//Steve.Orr.net
>
> "Justin" <Justin@.discussions.microsoft.com> wrote in message
> news:DEDB84FD-1EA9-4B5F-8258-26FDBC3392AB@.microsoft.com...
> it with Windows Forms in vb.net, but the .Show method is unavailable in
> WebForms in vb.net.
>
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment