ラベル datalist の投稿を表示しています。 すべての投稿を表示
ラベル datalist の投稿を表示しています。 すべての投稿を表示

2012年3月26日月曜日

Response.redirect causing error when used with ajax

Hi Guys,

I hope somebody can help me with my problem, I'm fairly new to ajax.I have a datalist in my app which has a clickable button which directs the user to a subroutine....


1Sub PhotoCommand(ByVal objAs Object,ByVal EAs DataListCommandEventArgs)2Dim CommandAs String = E.CommandName3Dim ArgumentAs String = E.CommandArgument45If Session("UserID")Is Nothing Then6 Response.redirect("index.aspx")7End If8End Sub


This works fine when not in a updatepanel and the updatepanel worksfine without the redirect in it, but when you use the two together andclick the button you get the following error in an alert box.

"Sys.Webforms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causesfor this error are when the response is modified by calls toresponse.write(), response filters, HttpModules or server trace isenabled

Details:Error parsing near'

<!DOCTYPE ht'"

Anyone got any idea why this might be ?

Jon

Hi,

Sorry guys, just found out what the problem was by searching the forum a bit more. FOr the sake of anyone else with the same problem, I had forgotten to add the following to my web.config...

<httpModules>

<addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

2012年3月21日水曜日

RoundedcornerExtender in Firefox

I have placed a rounded corner extender inside a datalist. Now I placed a named anchor (<a name="_myanchor">)

In another page I have set a link like "Mypage.aspx#_myanchor"

When its run in IE it works great and page scrolls to the bottom.

When its open in FF it moves to bottom, it takes two secs to draw the rounded corners (my be because there are more than 50 records) and scrolls little up.

I think the reason for this is rounded corner with border is drawn around the actual div resulting in an increase of the size (height also) of the page. When I disabled the extender it works perfect.

Please advice..

Thanks in Advance

Any hope?