Search code examples
c#internet-explorerfirefoxcode-behind

IE not recognized aspx.cs codebehind. firefox not getting this issue


I have a form and a submission button at the end.

<button type="submit" onclick="submission" role="button" aria-disabled="false">
    <span class="ui-button-text">Submit form</span>
</button>

in my codebehind file I have this

protected void submission(object sender, EventArgs e)
{
    Console.WriteLine(FirstName.textbox.Text);
}

Firefox doesn't give me problems when I execute the page, but IE does. Why?


Solution

  • First of all, writing the the console in an asp.net page is nonsense.

    Second, your button is client side. As it does not have runat="server" it would not fire your server side event that for no apparent reason outputs the value of a textbox to the console.