I've changed that before it didn't influence website or postback behavior (
I tried only with a textbox and a button plus the theme of course and still
got the same result, the value was what I typed, but when debugging and
running the code behind it was "" or null ).
So far what I've got from the way the event is handling is:
<input type="button" name="ctl00$MainContent$loginBtn" value="Sign In!"
onclick="javascript:__doPostBack('ctl00$MainContent$loginBtn','')"
id="MainContent_loginBtn" class="btn btn-inverse" style="width:220px;">
And:
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
On Thursday, 20 June 2013 06:25:42 UTC+1, Nick Hunyady wrote:
>
> What does Firebug show that is being posted to the server? I have never
> seen this behavior myself with Bootstrap but anything's possible since we
> all do something different in our own little way.
>
> One thing I do notice is that your labels should have the for="" the ID of
> the text field it is for. Ex.
>
> <div class="control-group"> <label class="control-label"
> for="LogUsernameText">Username</label>
> <div class="controls">
> <asp:TextBox ID="LogUsernameText" runat="server"
> MaxLength="14"></asp:TextBox>
> </div></div>
>
>
>
> On Wednesday, June 19, 2013 4:41:40 AM UTC-7, Diogo Alexandre wrote:
>>
>> I've tried pretty much everything I could, event changing it into a
>> normal HTML input.
>>
>> It works if I don't use the css.
>>
>> You can find more info or answer here if you prefer:
>> http://stackoverflow.com/questions/17174149/textbox-value-is-empty-when-button-is-clickedpostback-occurs
>>
>> Maybe I have to change my button back to UseSubmitBehaviour = True as it
>> was before, but then I will have a problem in which my button wont do what
>> it's told on the page code file.
>>
>> How it is executing:
>>
>> - Page loads, values are null;
>>
>> - Something is typed in textbox and button is clicked, debugger tells
>> value is what I typed;
>>
>> - On button event it says values are "" or null;
>>
>> - Finishes button event;
>>
>> - Page postback, and reload;
>>
>
--
You received this message because you are subscribed to the Google Groups
"twitter-bootstrap" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.