Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Ajax seems to work only in one of my content areas

Reply
Thread Tools

Ajax seems to work only in one of my content areas

 
 
tshad
Guest
Posts: n/a
 
      10-27-2009
I have a page I would like to use 2 different areas with Partial Rendering.

I have the top area as a bunch of drop downs that I need to fill as others
are selected. This part works fine if I have only one content area and the
closing UpdatePanel is just below the drop downs. Only the top half of the
screen is updated when a dropdown is selected.

The bottom half is a button that is used to fill the Gridview that is in the
bottom half (or more) of the screen. I have the code set up as:

<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="mScriptManager" runat="server"
EnablePartialRendering="true" />
<div>

<!-- Progress Indicator -->
<asp:UpdatePanel ID="pnlContainer" runat="server" >
<ContentTemplate>

<!-- Filter Grid -->

<aspanel ID="mFilterPanel" runat="server">


All of my drop downs here

</aspanel>
</ContentTemplate>
</UpdatePanel>

this works fine and the GridView is below that.

I wanted to change this to also surround the GridView with a ContentTemplate
so that only the GridView is handled when the button is pushed.

So I tried to change the above code to look like this:

<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="mScriptManager" runat="server"
EnablePartialRendering="true" />
<div>

<!-- Progress Indicator -->
<asp:UpdatePanel ID="pnlContainer" runat="server" >
<ContentTemplate>

<!-- Filter Grid -->

<aspanel ID="mFilterPanel" runat="server">


All of my drop downs here

</aspanel>
</ContentTemplate>
<ContentTemplate>

Some Table Code

<asp:ImageButton ID="btnRefresh"
ImageUrl="~/images/refresh_16.gif" runat="server"
ToolTip="Refresh Grid"
CssClass="GridActionButton" OnClick="btnRefresh_Click"
Style="width: 16px" />

More Table Code

<aspanel ID="mGridViewPanel" style="text-align:center"
runat="server">

<asp:Label ID="lblGridStatus" style="color:Red;
text-align:center" Visible="false" runat="server" />

<asp:GridView ID="GridView1"

.....

</aspanel>
</ContentTemplate>
</asp:UpdatePanel>

</ContentTemplate>
</UpdatePanel>

Now nothing works.

The dropdowns don't fill fill other dropdowns and the GridView doesn't work.

All I did was move the </UpdatePanel> down and added another
ContentTemplate.

Is there something else I need to do to get this to work???

Thanks,

Tom




 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      10-27-2009
On Oct 27, 5:40*am, "tshad" <t...@dslextreme.com> wrote:
> I have a page I would like to use 2 different areas with Partial Rendering.
>
> I have the top area as a bunch of drop downs that I need to fill as others
> are selected. *This part works fine if I have only one content area and the
> closing UpdatePanel is just below the drop downs. *Only the top half of the
> screen is updated when a dropdown is selected.
>
> The bottom half is a button that is used to fill the Gridview that is in the
> bottom half (or more) of the screen. *I have the code set up as:
>
> <body>
> * * <form id="form1" runat="server">
> * * * * <asp:ScriptManager ID="mScriptManager" runat="server"
> EnablePartialRendering="true" />
> * * * * <div>
>
> * * * * * * <!-- Progress Indicator -->
> * * * * * * <asp:UpdatePanel ID="pnlContainer" runat="server" >
> * * * * * * * * <ContentTemplate>
>
> * * * * * * * * <!-- Filter Grid -->
>
> * * * * * * * * * * <aspanel ID="mFilterPanel" runat="server">
>
> All of my drop downs here
>
> * * * * * * * * * * *</aspanel>
> * * * * * * * *</ContentTemplate>
> * * * * </UpdatePanel>
>
> this works fine and the GridView is below that.
>
> I wanted to change this to also surround the GridView with a ContentTemplate
> so that only the GridView is handled when the button is pushed.
>
> So I tried to change the above code to look like this:
>
> <body>
> * * <form id="form1" runat="server">
> * * * * <asp:ScriptManager ID="mScriptManager" runat="server"
> EnablePartialRendering="true" />
> * * * * <div>
>
> * * * * * * <!-- Progress Indicator -->
> * * * * * * <asp:UpdatePanel ID="pnlContainer" runat="server" >
> * * * * * * * * <ContentTemplate>
>
> * * * * * * * * <!-- Filter Grid -->
>
> * * * * * * * * * * <aspanel ID="mFilterPanel" runat="server">
>
> All of my drop downs here
>
> * * * * * * * * * * *</aspanel>
> * * * * * * * *</ContentTemplate>
> * * * * * * * * <ContentTemplate>
>
> * * * * * * * * * * Some Table Code
>
> * * * * * * * * * * * * * * * * * * <asp:ImageButton ID="btnRefresh"
> ImageUrl="~/images/refresh_16.gif" runat="server"
> * * * * * * * * * * * * * * * * * * * * ToolTip="Refresh Grid"
> CssClass="GridActionButton" OnClick="btnRefresh_Click"
> * * * * * * * * * * * * * * * * * * * * Style="width: 16px" />
>
> * * * * * * * * * * More Table Code
>
> * * * * * * <aspanel ID="mGridViewPanel" style="text-align:center"
> runat="server">
>
> * * * * * * * * <asp:Label ID="lblGridStatus" style="color:Red;
> text-align:center" Visible="false" runat="server" />
>
> * * * * * * * * <asp:GridView ID="GridView1"
>
> * * * * * * * * * * * * .....
>
> * * * * * * </aspanel>
> * * * * *</ContentTemplate>
> * * * </asp:UpdatePanel>
>
> * * </ContentTemplate>
> *</UpdatePanel>
>
> Now nothing works.
>
> The dropdowns don't fill fill other dropdowns and the GridView doesn't work.
>
> All I did was move the </UpdatePanel> down and added another
> ContentTemplate.
>
> Is there something else I need to do to get this to work???
>
> Thanks,
>
> Tom


Do you see any javascript error? If not, turn debugging on in IE

Tools->Internet Options…->Advanced->Disable Script Debugging

and enable Display a notification about every script error
 
Reply With Quote
 
 
 
 
tshad
Guest
Posts: n/a
 
      10-27-2009
Alexey Smirnov wrote:
> On Oct 27, 5:40 am, "tshad" <t...@dslextreme.com> wrote:
>> I have a page I would like to use 2 different areas with Partial
>> Rendering.
>>
>> I have the top area as a bunch of drop downs that I need to fill as
>> others are selected. This part works fine if I have only one content
>> area and the closing UpdatePanel is just below the drop downs. Only
>> the top half of the screen is updated when a dropdown is selected.
>>
>> The bottom half is a button that is used to fill the Gridview that
>> is in the bottom half (or more) of the screen. I have the code set
>> up as:
>>
>> <body>
>> <form id="form1" runat="server">
>> <asp:ScriptManager ID="mScriptManager" runat="server"
>> EnablePartialRendering="true" />
>> <div>
>>
>> <!-- Progress Indicator -->
>> <asp:UpdatePanel ID="pnlContainer" runat="server" >
>> <ContentTemplate>
>>
>> <!-- Filter Grid -->
>>
>> <aspanel ID="mFilterPanel" runat="server">
>>
>> All of my drop downs here
>>
>> </aspanel>
>> </ContentTemplate>
>> </UpdatePanel>
>>
>> this works fine and the GridView is below that.
>>
>> I wanted to change this to also surround the GridView with a
>> ContentTemplate so that only the GridView is handled when the button
>> is pushed.
>>
>> So I tried to change the above code to look like this:
>>
>> <body>
>> <form id="form1" runat="server">
>> <asp:ScriptManager ID="mScriptManager" runat="server"
>> EnablePartialRendering="true" />
>> <div>
>>
>> <!-- Progress Indicator -->
>> <asp:UpdatePanel ID="pnlContainer" runat="server" >
>> <ContentTemplate>
>>
>> <!-- Filter Grid -->
>>
>> <aspanel ID="mFilterPanel" runat="server">
>>
>> All of my drop downs here
>>
>> </aspanel>
>> </ContentTemplate>
>> <ContentTemplate>
>>
>> Some Table Code
>>
>> <asp:ImageButton ID="btnRefresh"
>> ImageUrl="~/images/refresh_16.gif" runat="server"
>> ToolTip="Refresh Grid"
>> CssClass="GridActionButton" OnClick="btnRefresh_Click"
>> Style="width: 16px" />
>>
>> More Table Code
>>
>> <aspanel ID="mGridViewPanel" style="text-align:center"
>> runat="server">
>>
>> <asp:Label ID="lblGridStatus" style="color:Red;
>> text-align:center" Visible="false" runat="server" />
>>
>> <asp:GridView ID="GridView1"
>>
>> .....
>>
>> </aspanel>
>> </ContentTemplate>
>> </asp:UpdatePanel>
>>
>> </ContentTemplate>
>> </UpdatePanel>
>>
>> Now nothing works.
>>
>> The dropdowns don't fill fill other dropdowns and the GridView
>> doesn't work.
>>
>> All I did was move the </UpdatePanel> down and added another
>> ContentTemplate.
>>
>> Is there something else I need to do to get this to work???
>>
>> Thanks,
>>
>> Tom

>
> Do you see any javascript error? If not, turn debugging on in IE
>
> Tools->Internet Options…->Advanced->Disable Script Debugging
>
> and enable Display a notification about every script error


I got an error right away. This was an error I got before when I tried to
surround a section a code before but it seems to ignore the commenting.

Content ('<!-- Process Grid -->') does not match any properties within a
'System.Web.UI.UpdatePanel', make sure it is well-formed.

Line 121: </ContentTemplate>
Line 122:
Line 123: <!-- Process Grid -->
Line 124: <ContentTemplate>
Line 125:

Not sure why this is a problem.

After I fix that problem by taking the comment out, I get this:

The ContentTemplate of UpdatePanel with ID '' cannot be changed after it has
been instantiated.

Line 13: <div>
Line 14:
Line 15: <asp:UpdatePanel ID="pnlContainer" runat="server" >
Line 16: <ContentTemplate>
Line 17:

What am I changing?

Thanks,

Tom
Thanks,

Tom


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Only seems to allow one wireless connection at a time Andrew_JMData Wireless Networking 5 02-23-2009 07:37 PM
Programmatically Create "Content" Areas for a Master Page Kevin Frey ASP .Net 0 09-18-2006 11:57 PM
Re: Making only the dark areas lighter? Patrick L. Digital Photography 3 07-13-2003 02:08 AM
Re: Making only the dark areas lighter? Peter Jones Digital Photography 0 07-11-2003 07:18 AM



Advertisments