Posted by Manobarathi under ADO.NET on 8/13/2014 | Points: 10 | Views : 12861 | Status : [Member] | Replies : 1
Hello All,

Im facing problem in asp dotnet
in my aspx page im having code like this
<asp:Button ID="btn_submit" CssClass="btn green" runat="server" Text="Submit Booking"
OnClick="btn_submit_Click" />
<asp:Button ID="btn_cancel" CssClass="btn orange" runat="server" Text="Cancel" OnClick="btn_cancel_Click" />

but after page render in my view source
code changed to
<input type="submit" name="btn_submit" value="Submit Booking" onclick="javascript:WebForm_DoPostBackWithOptions (new WebForm_PostBackOptions(&quot;btn_submit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btn_submit" class="btn green" />
<input type="submit" name="btn_cancel" value="Cancel" onclick="javascript:WebForm_DoPostBackWithOptions (new WebForm_PostBackOptions(&quot;btn_cancel&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btn_cancel" class="btn orange" />

so im getting javascript error javascript:WebForm_DoPostBackWithOptions undefinded

Thanks All

Mano Barathi


Posted by: Manobarathi on: 8/13/2014 [Member] Starter | Points: 25

Hi all,
I found answer to avoid javascript error its working fine

Create Dummy js function

function WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit) {


so now everything working fine no script error..

Thank you

Manobarathi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response