Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 14, 2009 09:19 AM by mahesh81
Jan 03, 2007 07:28 PM|LINK
I have a user control, which cotains a scriptmanager and updatepanel. Inside the update panel I have a calendar control and a textbox. On selectionchange event of the calendar contol, i store the claendar value into the the text box. it work fine.
but when i try to drag this user control more than once on my page, it gives me an error that only once instance of the script manager can be used. I understand this? and the soultion is to use scriptmanagerproxy? but how, i need an example or some url that
can help me with this.
thanks in advance.
Jan 03, 2007 08:22 PM|LINK
You can Add an scriptmanagerproxy to your user control the same way as you add you scriptmanager control. The scriptmanagerproxy reacts the same way the scriptmanager. You have to add the scriptmanager to your webpage and the scriptmanagerproxy to your user
control and your done!
Nov 07, 2007 07:55 PM|LINK
I have same problem and i did like you said in above thread, but no difference. Is there something i m still missing?
Nov 07, 2007 07:58 PM|LINK
well~, you don't really need to add a scriptmanagerproxy to your control. you just need to put the scriptmanager on the page (or master page) and then just drop the updatepanel on your user control. that should work without any problems...
Nov 08, 2007 12:23 AM|LINK
In my case it little different. Its not exactly the same as the first post. I dont have UpdatePanel. All i need to make textbox work with Ajax in userControl which get called from Default.aspx page. My scriptManager is already declared in in the master page.
Nov 08, 2007 08:20 AM|LINK
can you give more info about this?
Nov 08, 2007 02:51 PM|LINK
Thanx for the reply....I can explain more in detail as:
I m trying to use CalendarExtender in my ascx file. The issue is i cant declare ScriptManager on this page since this get called many times based on number of rows returned and u cant add more than one ScriptManager in a page.
For this i added, the ScriptManager in the Master page. But i dont know how to use it in ascx after declaring it into the master page.
I am able to use to it in Default.aspx page using MasterPageFile ="~/MainMaster.master" ; but in ascx file, i cant declare this directive. I used Reference i.e.
<%@ Reference VirtualPath="~/Mainmaster.master" %> ; but no use.
The structure is of calling is ::
MasterPage --> Default.aspx --> Detail.ascx
I can use ajax upto Default.aspx but including file in Default.aspx but cant do anything in Detail.ascx file
Nov 08, 2007 07:00 PM|LINK
but why would you want to get a reference to the scriptmanager control on your user control? if it's on the master and the master was applied to the page that has the user control then you don't need to do anything else.
Nov 08, 2007 07:29 PM|LINK
My default is on master. My child which is user web control is at the end is called by default. So basically master was applied to the default page.
If i m doing something wrong, let me know that....My problem as u know is that ajax is not wroking in the chold control
Nov 08, 2007 07:32 PM|LINK
ok, please build a small demo page that shows this. you'll need a master, a user control and a page that uses that control. post it here and i'll take a look, ok?