Categories
.NET ASP.NET C#.NET VB.NET/VB

Two Forms in ASP.Net

Hi,

As any other ASP.Net developer, I was not feeling comfortable with only one form concept that ASP.Net has (not sure about v2.0 as never work on it). Also, when you have to put something like google Search or other such service on your Site and place for such “explicit” forms are in middle of your Only “Runat Server form” how will you put the other forms …

Well what I did is simply use IFrame, capabilities of web browsers. I simply make a HTML page of Google search, and using IFrame call that page. now since it load explicit HTML page, you don’t have to worry about nested form, but simply about how it looks.

though It has a disadvantage that , on older browser your site might not be viewable, but who cares about old stuffs … every body you should get new browser after all browser are free 🙂

Sumit Gupta

By Sumit Gupta

Sumit Gupta, a developer by choice.

2 replies on “Two Forms in ASP.Net”

hey i tried what you suggested, but the google search results stayed with in the frame. how did you get around this? -thanks, a8le

Hi,
Sorry for late answer, but I am not looking this blog anymore as I have my new blog at http://www.sumtigupta.net.

Well in my installation of google ad in that matter, I configure google to open it in New windows itself, so I don’t have to worry about where my code open the search result.
But you can set that to open in your main window, as google gives Form Target=”_top”, you can change it to use your main content area. Please Form element and its attribute for the same.

Hope that helps you

Comments are closed.