Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Monday, March 26, 2012

PageRequest context

I know the WebRequest class in js has a userContext property but how do I do the same in a PageRequest class.

Maybe I am asking the wrong question.

I want to keep track of which control raised the event (postBackElement property) so that when the request completes, I can set some properties for the control that raised the event.

Thanks.

Try to take a look at this link?about?WebRequest from MSDN -?http://msdn2.microsoft.com/en-us/library/system.net.webrequest.aspx
Is?PageRequest Class?you?said?in?your?last?post?in?Java? If?yes,try?to?take?a?look?at?this?link?about?PageRequest?Class
http://docs.jboss.org/jbportal/v2.2/javadoc/org/jboss/portal/theme/page/PageRequest.html?
http://www.valtira.com/api/cms/com/valtira/cms/client/PageRequest.html
Wish the above can give you some helps.

Saturday, March 24, 2012

PageRequestManagerServerErrorException with 500 error code

In javascript I'm setting the value property of a button within an update panel before calling click() on the button to refresh the update panel. (I need to refresh an update panel and pass extra data on the callback, and no one on this forum has yet described a better way of doing it than this.)

This was all working in tests that I did last week, but I'm now getting the following error message box in IE:

"Sys.WebForms.PageRequestManagerServerErrorException: An unkown error ocurred while processing the request on the server. The status code returned from the server was: 500"

Any ideas?

I have the same error but on a couple of dropdown which update one another's datesource with updatePanels.

If i change the value of the first dropdown for several times, always the third tine gives this error.

I found on a post the setting TRACE off resolves but not for me.

Any ideas ?

Just try to change frequently some controls which use updatepanels (for other controls) and see what's happen.

Thank's

Sorin


I found also that If I have more than 3 UpdatePanels in a Page I get this error after 3 callbacks.

If I have on page Trace="false"and "EnableEventValidation="true"

I get this error:

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@. Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Thank's again


I've also tried setting the value of a hidden field and a hidden textbox and both raise the same error.

I cannot even paste data into a textbox and then do a postback without getting this error.

I'm also EXTREMELY TIRED OF MICROSOFT IGNORING ALL OF MY POSTS!!!!!!!!!!! Angry

Wednesday, March 21, 2012

Parser Error Message: Type System.Web.UI.UpdatePanel does not have a public property named

Hi, first post...I am fairly new to ajax and was looking for some guidance on my problem. I installed the 3 files (Ajax 1.0 RC, Toolkit and the Futures December CTP). I wanted to convert an exsisting and working .net 2.0 sample aspx page into AJAX to learn how the updatepanels work. The page contains a bunch of datagrids that i wanted to place inside "updatepanels".

However, I keep getting the parser error"Type 'System.Web.UI.UpdatePanel' does not have a public property named 'datagrid'." whenever I placeanything inside the panels (table, div, tr...etc). I am sure its a pretty straight forward problem but not sure where to start looking.

If it matters, my solution in MS Visual Studio does not include a BIN folder. (something tells me i need it) I created a "New Website" and selected "AJAX-enabled website" and went from there. I could not find templates to start working from.

Thanks in advance!
Skimo!

<

asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<

asp:datagridid="results"runat="server"GridLines="Horizontal"BorderWidth="2px"BorderColor="#f4f4f4"CellPadding="5"CellSpacing="0"AlternatingItemStyle-BackColor="#EAEAFF"ShowHeader="False"Width="100%"Autogeneratecolumns="False"AllowPaging="true"BorderStyle="Solid"PageSize="25"OnPageIndexChanged="results_Paging"><columns><asp:TemplateColumnItemStyle-Width="15%"><ItemTemplate>

<%

# DataBinder.Eval(Container.DataItem,"createdate") %></ItemTemplate></asp:TemplateColumn><asp:TemplateColumnItemStyle-Width="15%"><ItemTemplate>

<%

# DataBinder.Eval(Container.DataItem,"name") %></ItemTemplate></asp:TemplateColumn><asp:TemplateColumnItemStyle-Width="70%"><ItemTemplate>

<%

# DataBinder.Eval(Container.DataItem,"comment") %></ItemTemplate></asp:TemplateColumn>

</columns><PagerStyleMode="NumericPages"HorizontalAlign="Center"/>

</

asp:datagrid>

</

asp:UpdatePanel>

you cant load datagrid in the page.load when its inside of UpdatePanel.

This is because UpdatePanel gets call first before the grid gets load. Thats is why it couldnt find it.

you can have button inside of updatepanel, when you click the button the it will do databind with grid


It is indeed a straightforward problem. Everything inside an UpdatePanel goes inside a "ContentTemplate", like this:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DataGrid ...>
</asp:DataGrid>
</ContentTemplate>
</asp:UpdatePanel>


Thank you so much!! I learned something :)

Does this mean I do not need to worry about the BIN folder not being there?

-Skimo


You won't need a bin folder to just use ASP.NET AJAX itself, since it gets installed globally for the machine.

If you use the AJAX Control Toolkit or the December Futures CTP, then your project will need to have the appropriate binaries in the bin folder.

I'm glad you're off and running... good luck exploring ASP.NET AJAX!


Great thanks for your help!

Skimo