forum

Home / DeveloperSection / Forums / __doPostBack clears all text fields

__doPostBack clears all text fields

Anonymous User 1864 20-Nov-2014

I want to call an ASP.NET code behind method from JQuery and I use it by calling another hidden button OnClick attribute.

As you see I have to use __doPostBack function which clears all my form inputs after code behind code is done.

Is there a way to prevent emptying my inputs?

Thanx in advance

ASPX:

<asp:Button runat="server" ClientIDMode="Static" UniqueID="SubmitBTN" ID="SubmitBTN" OnClick="Submit_Click" Text="Submit" CssClass="DontShow" />
button type="button" runat="server" onclick="submitfunc()" class="submit">Submit</button>

JQuery:

function submitfunc() {
     __doPostBack('<%= SubmitBTN.UniqueID %>', '');
}


Updated on 21-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By