news:DEDB84FD-1EA9-4B5F-8258-26FDBC3392AB@dotnet.itags.org.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.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 another 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...
> > 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.
>
0 comments:
Post a Comment