Showing posts with label reference. Show all posts
Showing posts with label reference. Show all posts

Monday, March 26, 2012

detecting partial page postback

I read it somewhere here before, but can;t seem to find the reference today.

What is the code for separating the different types of postbacks (full page, partial postback, etc.)? I need to do this prammatically from a user control.

Hi,

You have ScriptManager.IsInAsyncPostBack to check if the page is performing an asyncpostback and UpdatePanel.IsInPartialRendering to check whether that particular updatepanel is performing a partial rendering.

Hope this helps,

Juan


Thanks for the info, that helps alot.

For anyone out there doing this from within a usercontrol, here is some code:

Dim tempScriptAs ScriptManager

tempScript =CType(page.FindControl("scriptManager1"), ScriptManager)

Dim asyncAsBoolean = tempScript.IsInAsyncPostBack

--

<

asp:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true">

</asp:ScriptManager>

Saturday, March 24, 2012

deployment issue with Atlas

hi,

I installed atlas and added the atlas reference in asp.net application (asp2.0 with VS 2005) in the development envrionment and created some screens which use partialrendering. The app runs fine on the development machine. But when I copied my files to the server the screens which have partialrendering fail with an error "Unknown server tag 'atlas:ScriptManager'. " Now i have included the Microsoft.Web.Atlas.dll in the bin directory and also added all the keys required to the web.config that is present in the dev machine. As a last resort I also went and installed Atlas on the webserver . And I am still getting the same error. By the way all other screens work fine, no issues.

Any help would be greatly appreciated.

Thanks.

hello.

the most common issue people are facing is incorrect configuration of IIS. for example, many forget to configure the application so that it uses asp.net 2.0. have you checked that?


Yes. The application was already using asp2.0 and in the webserver environment a while back. Only recently did I include Atlas, and I am still stuck and cannot seem to figure out why i have having problems with pages which use partialrendering. It is not recognizing<atlas:ScriptManager> tag which I would think means my settings for Atlas is not correct. Is there an article or something which says how to deploy atlas to webservers ?

Thanks.


hello.

btw, have you checked the web.config file to see if the that atlas prefix is mapped to the correct assembly?


Thank you very very much. That was it, you are genius :-). I do not overwrite web.config on server from the dev environment and I missed those 3 lines in it.


nmuralidhar:

That was it, you are genius :-).

well, i wish i was one, but i'm not :)


Dear nmuralidhar, you said "I do not overwrite web.config on server from the dev environment and I missed those 3 lines in it." What are those 3 lines. Thanks.
hi.

~i think he was talking about the old 3 lines which mapped the atlas prefix to the namespaces where the atlas controls used to exist. now things are different:
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI" assembly="Microsoft.Web.Preview"/>
<add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI.Controls" assembly="Microsoft.Web.Preview"/>
</controls>
</pages
discard the last 2 lines if you're not using the future bits