You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using bootstrap in an asp.net app, and absolutely loving it. I ran into an issue, which I solved .. but I really wanted to know if anyone sees any red flags with my solution.
The issue is, asp.net demands that there is one <form> tag, with attribute runat="server" for their code behind stuff to work properly. I was using multiple <form class="form-horizontal"></form>'s on a page, but as only one <form> can exist with attribute runat="server" (or asp.net errors out) only the controls within the one <form runat="server"> would get enabled for code behind.
My first solution was to wrap multiple <form>'s in one enclosing <form runat="server"> but nested form tags create a problem, as HTML validation actively rejects them, and they were ignored (by firefox) and my styling went awry. (looked at view source and DOM after render, only parent <form> was regarded)
So I did this .. I used one and only one enclosing <form runat="server">, and then used div's instead of forms for control grouping . .eg <form runat="server">...<div class="form-horizontal">...</div><div class="form-horizontal">...</div></form> .. and everything seems to look and work just fine. (left out row and span divs for brevity)
so my question is .. is there any problem with using <div class="form-horizontal"> .. specifically using class "form-horizontal" with div's. .. it works fine as far as i can tell so far, and I tried firefox/chrome/IE with good results .. but i'm no CSS expert so i'm concerned.
The text was updated successfully, but these errors were encountered:
I am using bootstrap in an asp.net app, and absolutely loving it. I ran into an issue, which I solved .. but I really wanted to know if anyone sees any red flags with my solution.
The issue is, asp.net demands that there is one <form> tag, with attribute runat="server" for their code behind stuff to work properly. I was using multiple <form class="form-horizontal"></form>'s on a page, but as only one <form> can exist with attribute runat="server" (or asp.net errors out) only the controls within the one <form runat="server"> would get enabled for code behind.
My first solution was to wrap multiple <form>'s in one enclosing <form runat="server"> but nested form tags create a problem, as HTML validation actively rejects them, and they were ignored (by firefox) and my styling went awry. (looked at view source and DOM after render, only parent <form> was regarded)
So I did this .. I used one and only one enclosing <form runat="server">, and then used div's instead of forms for control grouping . .eg <form runat="server">...<div class="form-horizontal">...</div><div class="form-horizontal">...</div></form> .. and everything seems to look and work just fine. (left out row and span divs for brevity)
so my question is .. is there any problem with using <div class="form-horizontal"> .. specifically using class "form-horizontal" with div's. .. it works fine as far as i can tell so far, and I tried firefox/chrome/IE with good results .. but i'm no CSS expert so i'm concerned.
The text was updated successfully, but these errors were encountered: