Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Wednesday, March 28, 2012

Ajax UpdatePanel does not return MS-SQL errors??

I have a datagrid wrapped in an UpdatePanel. When I try adding or editing a row that violates a check constraint, I recieve the ridiculous Sys.WebForms.PageRequestManagerPerserErrorException: the message received from the server could not parsed... instead of the MS-SQLL error message.

Is there a way to rectify this behaviour?

TIA

Hi,

Please refer to this for the reason of the error:

http://siderite.blogspot.com/2007/02/aspnet-ajax-and-responsewrite-or.html

Hope this helps.

NOTE:This response contains a reference to a third partyWorld Wide Web site. Microsoft is providing this information as a convenienceto you. Microsoft does not control these sites and has not tested any softwareor information found on these sites; therefore, Microsoft cannot make anyrepresentations regarding the quality, safety, or suitability of any softwareor information found there. There are inherent dangers in the use of anysoftware found on the Internet, and Microsoft cautions you to make sure thatyou completely understand the risk before retrieving any software from theInternet.


I'm not sure about what is the inner problem of your application.
But I also face this kind of problem - 'Sys.WebForms.PageRequestManagerPerserErrorException:'. So far I
understand this happen when there is some unrecongnize html render or event occurs. I'm also not very clear.
But I solve the issue by set the attribute EnableEventValidation="false" in the ASPX page, where I place my UpdatePanel.Thanks
I'm not sure about what is the inner problem of your application.

But I also face this kind of problem - 'Sys.WebForms.PageRequestManagerPerserErrorException:'. So far I
understand this happen when there is some unrecongnize html render or event occurs. I'm also not very clear.

But I solve the issue by set the attribute EnableEventValidation="false" in the ASPX page, where I place my UpdatePanel.

Thanks

Thanks Raymond,

Yep. You can't write to the response stream when using AJAX.


Here is one more link

http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx

Wednesday, March 21, 2012

AJAX still having core problems?

I started using ajax with vs 2005 and the problem is
Pages creating onclick="return TABLE1_onclick()" causing javascript errors which came out from NOWHERE!!!!

For some reason the HTML that is being created by my ASP.Net pages
(2.0) have a table like this:Can u beleive it?

<table border="0" cellpadding="0" cellspacing="0" style="z-index: 103;
left: 0px; width: 100%; position: absolute; top: 0px;" id="TABLE1"
onclick="return TABLE1_onclick()"
This ends up causing a javascript error "Object excpected" when you
click on the page because there is no TABLE1_onclick() function. Why
is it doing this and what can I do to get it to stop? I'm not doing
anything fancy, just creating simple pages using a master page.

Thanks,

PS:asp.net team needs to work harder if they wanna hold some ground against other ajax vendors.

Hi,

Can you show me the relative code to help me reproducing the issue?
Looking forward to your reply.

<%

@.PageAutoEventWireup="true"CodeFile="musteri_alici.aspx.cs"Inherits="FORMS_MUSTERI_musteri_anasayfa"Language="C#"MasterPageFile="~/MASTERPAGE/OEO.master"Title="Mü?teri Anasayfa" %>

<

asp:ContentID="Content1"ContentPlaceHolderID="cphAna"runat="Server"><tableborder="0"cellpadding="0"cellspacing="0"style="width: 100%"><tr><tdclass="Beyaz10Bold"colspan="7"style="padding-left: 5px; height: 40px; background-color: #e5c130;

text-align: left">tt

Mü?terilerim

<br/>

Al?c?lar

</td></tr><tr><tdcolspan="7"><span><asp:ImageID="imgBosluk"runat="server"Height="20px"ImageUrl="~/IMAGES/bosluk.gif"Width="1px"/></span></td></tr></table><tablestyle="width: 100%"border="0"cellpadding="0"cellspacing="0"><tr><tdstyle="padding-bottom: 1px; padding-top: 1px; background-color: #f7ecc0; "><tableborder="0"cellpadding="0"cellspacing="0"style="width: 100%"><tr><tdstyle="text-align: center;"><asp:ButtonID="btnYeniMusteriUst"runat="server"Text="Yeni Mü?teri"OnPreRender="btnYeniMusteri_PreRender"CssClass="button"/></td></tr></table></td></tr></table>

<tableid="tblMusteri"runat="server"border="0"cellpadding="0"cellspacing="0"style="width: 100%"><tr><tdid="tdAlt"runat="server"colspan="6"style="height: 18px"></td></tr></table><asp:GridViewID="grdAlici"runat="server"AutoGenerateColumns="False"BorderWidth="1px"CellPadding="2"GridLines="None"Width="100%"OnRowDataBound="grdAlici_RowDataBound"DataKeyNames="_ID,MEMBERID"AllowPaging="True"CssClass="Kirmizi9Bold"PageSize="25"OnPageIndexChanging="grdAlici_PageIndexChanging"EmptyDataText="Kay?t Bulunamad?"><Columns><asp:TemplateFieldHeaderText="??lem"><ItemTemplate><tableborder="0"cellpadding="0"cellspacing="0"id="TABLE1"onclick="return TABLE1_onclick()"><tr><tdstyle="width: 105px; "><asp:HyperLinkID="hplAliciGit"runat="server"CssClass="Siyah10">Git</asp:HyperLink>

|

<asp:HyperLinkID="hplAliciDuzenle"runat="server"CssClass="Siyah10">Düzenle</asp:HyperLink>

|

<asp:LinkButtonID="lnkAliciSil"runat="server"OnClick="lnkSilAlici_Click"CssClass="Siyah10">Sil</asp:LinkButton></td></tr></table></ItemTemplate></asp:TemplateField><asp:BoundFieldHeaderText="?sim"DataField="_NAME"><HeaderStyleWidth="15%"/></asp:BoundField><asp:TemplateFieldHeaderText="Y?ld?z"></asp:TemplateField><asp:BoundFieldHeaderText="Son ?leti?im Tarihi"/><asp:BoundFieldHeaderText="Telefon"DataField="MOBILETEL"><HeaderStyleWidth="15%"/></asp:BoundField><asp:TemplateFieldHeaderText="Aktivite"><ItemStyleHorizontalAlign="Left"/><ItemTemplate><asp:LabelID="lblAlici"runat="server"CssClass="Siyah10"></asp:Label></ItemTemplate></asp:TemplateField>

</Columns><PagerStyleHorizontalAlign="Center"/><HeaderStyleBackColor="#E5E5E5"CssClass="Siyah10Bold"/><AlternatingRowStyleBackColor="White"/><RowStyleCssClass="Siyah10"/><EmptyDataRowStyleCssClass="Kirmizi9Bold"Height="30px"HorizontalAlign="Left"/></asp:GridView><br/><tableborder="0"cellpadding="1"cellspacing="1"class="Siyah10"><tr><tdstyle="width: 5px;"align="left"class="Siyah8"><span><asp:HyperLinkID="hplA"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=A"CssClass="Siyah8">A</asp:HyperLink></span></td><tdalign="left">

|

</td><tdstyle="width: 5px;"align="left"class="Siyah8"><asp:HyperLinkID="hplB"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=B"CssClass="Siyah8">B</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=1&go=+Go%21+"><spanstyle=""/></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplC"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=C"CssClass="Siyah8">C</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=2&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hpl?"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=?"CssClass="Siyah8">?</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=2&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplD"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=D"CssClass="Siyah8">D</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=3&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplE"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=E"CssClass="Siyah8">E</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=4&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplF"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=F"CssClass="Siyah8">F</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=5&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplG"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=G"CssClass="Siyah8">G</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=6&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplH"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=H"CssClass="Siyah8">H</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=7&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplI"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=I"CssClass="Siyah8">I</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=8&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hpl?"runat="server"Width="1px"CssClass="Siyah8">?</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=8&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplJ"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=J"CssClass="Siyah8">J</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=9&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplK"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=K"CssClass="Siyah8">K</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=10&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplL"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=L"CssClass="Siyah8">L</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=11&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplM"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=M"CssClass="Siyah8">M</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=12&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplN"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=N"CssClass="Siyah8">N</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=13&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplO"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=O"CssClass="Siyah8">O</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=14&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hpl?"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=?"CssClass="Siyah8">?</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=14&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplP"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=P"CssClass="Siyah8">P</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=15&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplQ"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=Q"CssClass="Siyah8">Q</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=16&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplR"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=R"CssClass="Siyah8">R</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=17&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplS"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=S"CssClass="Siyah8">S</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=18&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hpl?"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=?"CssClass="Siyah8">?</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=18&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplT"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=T"CssClass="Siyah8">T</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=19&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplU"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=U"CssClass="Siyah8">U</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=20&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplü"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=ü"CssClass="Siyah8">ü</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=20&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplV"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=V"CssClass="Siyah8">V</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=21&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplW"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=W"CssClass="Siyah8">W</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=22&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplX"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=X"CssClass="Siyah8">X</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=23&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplY"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=Y"CssClass="Siyah8">Y</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=24&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="width: 5px"class="Siyah8"><asp:HyperLinkID="hplZ"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=Z"CssClass="Siyah8">Z</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=25&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left">

|

</td><tdalign="left"style="height: 18px"><asp:HyperLinkID="hplOther"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx?harf=Diger"CssClass="Siyah8">Di?er</asp:HyperLink><ahref="/006?fcf=00B30000002Mqk3&lsc=26&go=+Go%21+"><spanstyle=""></span></a></td><tdalign="left"style="height: 18px">

|

</td><tdalign="left"style="width: 17px; height: 18px"class="Siyah8"><spanclass="bodyBold"><asp:HyperLinkID="hplAll"runat="server"Width="1px"NavigateUrl="~/FORMS/MUSTERI/musteri_alici.aspx"CssClass="Siyah8">Tümü</asp:HyperLink></span></td></tr></table>

<tableborder="0"cellpadding="0"cellspacing="0"style="width: 100%"><tr><tdclass="Siyah9"style="padding-left: 5px; padding-top: 15px; text-align: left; height: 31px;">

* Di?er menüsünde kurum, i? ortaklar? gibi extra mü?teri tipleri bulunmaktad?r.

</td></tr></table><br/><tablestyle="width: 100%"border="0"cellpadding="0"cellspacing="0">

<tr><tdstyle="padding-bottom: 1px; padding-top: 1px; background-color: #f7ecc0"><tableborder="0"cellpadding="0"cellspacing="0"style="width: 100%">

<tr><tdstyle="text-align: center;"><asp:ButtonID="btnYeniMusteriAlt"runat="server"CssClass="button"Text="Yeni Mü?teri"OnPreRender="btnYeniMusteri_PreRender"/></td></tr></table></td></tr></table>

</

asp:Content>

<%

--Halil--%>
It seems theonclick="return TABLE1_onclick()" is added by your code.
I think it's your responsibility to add the corresdponding javascript function.