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!







# 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>






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">
<asp:DataGrid ...>

Thank you so much!! I learned something :)

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


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!


No comments:

Post a Comment