CrazyEngineers
  • Onserverclick not sending the event

    Jatin Kumar

    Jatin Kumar

    @jatin-SWWqiE
    Updated: Oct 26, 2024
    Views: 1.3K
    i was just playing with html codes ,i was trying this
    Html code:
    <<input runat="server" id="SubmitButton" type="submit"  value="submit" onserverclick="MySubmitHandler" /></p> //submit Button
    C# Code:
    protected void MySubmitHandler(object sender, EventArgs args)
            {
               
                ResultLabel.InnerText="Thanks for clicking :)";
            }
    
    ResultLable:
    <label id="ResultLabel" style="font-family: Arial; font-size: 12px;  font-weight: bold;  font-variant: normal; color: #FF0000; background-color: #00FF00" runat="server" >[Result will be displayed here]</label>
    The onclickserver is not working and not sending any event,no result is being displayed??
    and i know this can be done using some other ways i.e. javascript,asp.net controls
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register