By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

Open a webform

P: n/a
Hi,

I have 2 webform Webform1 & WebForm2

In Webform1 I have a button that when I click I want to first set a variable
in WebForm2 & then open the Page.

This is the code I have now which sets the variable but I cannot figure out
how to make the page load

Webform2 frm = new WebForm2();
frm.var1 = "####";

Now how do I make the Form load;

Thanks,
Ivan Sammut
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
If your form name is Frm1, then try

Frm1.Show(); //non modal

or

Frm1.ShowDialog(); //modal


"Ivan Sammut" <sa*****@nextgen.net.mt> wrote in message
news:Od****************@tk2msftngp13.phx.gbl...
Hi,

I have 2 webform Webform1 & WebForm2

In Webform1 I have a button that when I click I want to first set a variable in WebForm2 & then open the Page.

This is the code I have now which sets the variable but I cannot figure out how to make the page load

Webform2 frm = new WebForm2();
frm.var1 = "####";

Now how do I make the Form load;

Thanks,
Ivan Sammut

Nov 15 '05 #2

P: n/a
It's a webform not a normal Form
"Ben Rush" <kw*****@yahoo.com> wrote in message
news:OS**************@TK2MSFTNGP10.phx.gbl...
If your form name is Frm1, then try

Frm1.Show(); //non modal

or

Frm1.ShowDialog(); //modal


"Ivan Sammut" <sa*****@nextgen.net.mt> wrote in message
news:Od****************@tk2msftngp13.phx.gbl...
Hi,

I have 2 webform Webform1 & WebForm2

In Webform1 I have a button that when I click I want to first set a

variable
in WebForm2 & then open the Page.

This is the code I have now which sets the variable but I cannot figure

out
how to make the page load

Webform2 frm = new WebForm2();
frm.var1 = "####";

Now how do I make the Form load;

Thanks,
Ivan Sammut


Nov 15 '05 #3

P: n/a
Ivan Sammut wrote:
Hi,

I have 2 webform Webform1 & WebForm2

In Webform1 I have a button that when I click I want to first set a variable
in WebForm2 & then open the Page.

This is the code I have now which sets the variable but I cannot figure out
how to make the page load

Webform2 frm = new WebForm2();
frm.var1 = "####";

Now how do I make the Form load;

Thanks,
Ivan Sammut

Ivan,
What you need is to use the Server.Transfer method. In the second
page you can get the 'Handler' which really is webform1. So all you need
to do is to cast it as a webform1 (with check ofcourse, to see if it
really is webform1!) and get all the properties that you need.
Hope that helps
--
Regards,
Dilip Krishnan
dilip removethis @ msn.com
Nov 15 '05 #4

P: n/a
Hi,

Can you please give me a small example. I'm still a rookie and half of what
you said does not make sense.

Thanks
Ivan Sammut

"Dilip Krishnan" <di******************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Ivan Sammut wrote:
Hi,

I have 2 webform Webform1 & WebForm2

In Webform1 I have a button that when I click I want to first set a variable in WebForm2 & then open the Page.

This is the code I have now which sets the variable but I cannot figure out how to make the page load

Webform2 frm = new WebForm2();
frm.var1 = "####";

Now how do I make the Form load;

Thanks,
Ivan Sammut

Ivan,
What you need is to use the Server.Transfer method. In the second
page you can get the 'Handler' which really is webform1. So all you need
to do is to cast it as a webform1 (with check ofcourse, to see if it
really is webform1!) and get all the properties that you need.
Hope that helps
--
Regards,
Dilip Krishnan
dilip removethis @ msn.com

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.