Link to home
Start Free TrialLog in
Avatar of Webboy2008
Webboy2008

asked on

asp.net / ajax / c#

I recently added ajax script manager / update panel into the masterpage.
it is working fine but when I tried to click on some controls on ascx file
like radio button and etc. It alerts me:
error executing child request for webpage.aspx

and I can't even select radio button.
how to fix it?
Avatar of GlobaLevel
GlobaLevel
Flag of United States of America image

masterpages to my knowledge are not meant for controls...but for layout....i would keep the controls and ajax controls in .aspx pages...
Avatar of SAMIR BHOGAYTA
Hello, when you use the masterpage at that time you have to use the trigger for update panel and set the controlid = submit/save button. It is working.
try to put an Updatepanel inside the Control itself, and let it do the Update.
Avatar of Webboy2008
Webboy2008

ASKER

OHDev2004: Example please. I don't know what you mean
I mean add an Updatepanel inside the Control, and put all the contents inside it.
this will let this updatepanel handle Updates, inplace of the Updatepanel that resides in the Masterpage.


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Control1.ascx.cs"
    Inherits="Control1" %>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
        <ContentTemplate>
             <%--controls and contents inside the controls go here.--%>

        </ContentTemplate>
    </asp:UpdatePanel>

Open in new window

that is what i done. but i still see the alert message when radiobutton is clicked.
And the radiobutton itself has postback = true
1- use the Ajax ToolkitScriptManager instead of the regular asp ScriptManager

2- I always try to avoid using an updatepanel for all the website, ie putting the ContentPlaceHolder inside of the Updatepanel.
if you really need an updatepanel in the masterpage for some contents related to it, then just keep the ContentPlaceHolder out if it, and use updatepanels for each page or control when needed.
Item 1 - I understood.

Item 2 - I don't understand. If I don't add updatepanel in the masterpage.
can you suggest what I should do and send me example? I prefer the best solution.
did item 1 do any difference?

item 2:
what i mean is instead of using one UpdatePanel for the whoe website, that is putting an updatepanel in the masterpage to let the children webpages use it.
instead of that remove that updatepanel, and let each page/control have its own updatepanel.
Item 2: why?
ASKER CERTIFIED SOLUTION
Avatar of Amro Osama
Amro Osama
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
glad i could help, so was it Item 1 or Two? :)