new webform inside another
-
Hi. I'm trying to open a new webform inside another active webform, sort of like a pop-up. THe idea of the smaller form is that the user can select a street for an address to go with the city that was selected on the main form. Once the street is selected, the pop-up closes and the data is moved to the main form. Now, I've been able to do all of this with datagrids on the main form (we use SQL SERVER here), but it is not very nice to the eye. Anyway, my question is thus: Is there a way to have C# open a new, smaller form, without haveing to resort to Javascript in the HTML of the main ASPX page. Krisman
-
Hi. I'm trying to open a new webform inside another active webform, sort of like a pop-up. THe idea of the smaller form is that the user can select a street for an address to go with the city that was selected on the main form. Once the street is selected, the pop-up closes and the data is moved to the main form. Now, I've been able to do all of this with datagrids on the main form (we use SQL SERVER here), but it is not very nice to the eye. Anyway, my question is thus: Is there a way to have C# open a new, smaller form, without haveing to resort to Javascript in the HTML of the main ASPX page. Krisman
First, this is better suited for the ASP.NET forum. Second, C# compiles to IL which is contained in assemblies which execute code ON THE SERVER. In laymen's terms, C# is only server-side when dealing with Web Forms. So, no, you can't open a popup window using C# without resorting to writing some Javascript/JScript or an HTML link with an appropriate
onclick
handler ortarget
attribute value. A quick search on CodeProject would reveal (and at the time this was written, it was right on the homepage under "Latest Best Picks") an ASP.NET WebControl that makes popups easy to deal with (at least for n00bs) at http://www.codeproject.com/aspnet/asppopup.asp[^].-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
First, this is better suited for the ASP.NET forum. Second, C# compiles to IL which is contained in assemblies which execute code ON THE SERVER. In laymen's terms, C# is only server-side when dealing with Web Forms. So, no, you can't open a popup window using C# without resorting to writing some Javascript/JScript or an HTML link with an appropriate
onclick
handler ortarget
attribute value. A quick search on CodeProject would reveal (and at the time this was written, it was right on the homepage under "Latest Best Picks") an ASP.NET WebControl that makes popups easy to deal with (at least for n00bs) at http://www.codeproject.com/aspnet/asppopup.asp[^].-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----