I'm beginner in asp.net ajax.
Now I have to writecustom control and apply machanismpartial updating(which can be applied for User Control)
Could I can applyasp.net ajax forCustom Controlor not , and how to do this ?
Thanks a lot !
Thank you very much !
In fack UpdatePanel can be added to Custom Control !
But I have one problem more !
For creating Custom Control Im using the command in Console
csc /t:library /out:MGR.dll /r:System.dll /r:System.Web.dllMGR.cs
MGR is the name of Custom Control class
after compiling I got the error "the type or namespace name 'UpdataPanel' could not be found (are you missing directive or an assembly referrence?)"
I modified the command to
csc /t:library /out:MGR.dll /r:System.dll /r:System.Web.dll /r:Microsoft.Web.Atlas.dll MGR.cs
but got the same error !
I don't know why ? do you know why this error occured ?
HTD
I dont know exactly what your control will be doing, but all you should need to do is design the whole control in an asp.net ajax update panel.
My goal is "Partial Updating" in Control(which include TextBox and GridView). How you can add Update Panel in Custom Control ??
(In User Control, it's easy to do )
Open your Control.ascx file.
Drag and drop a update panel on to your page.
Select everything but the update panel.
Drag and drop your selection into the update panel.
That's everything you need to do to set up the control.
Anytime you use your control in your application, make sure you have the "Script Manager" Ajax extension on that page.
My deverloping Control is Custom Control, it's not User Control !
HTD
You should b eable to add it like any other control... ?
UpdatePanel panel = new UpdatePanel();
etc.
you can add a custom control class to a updatepanel like this
myControl ctrl =new MyControl();UpdatePanel1.ContentTemplateContainer.Controls.Add(ctrl);
No comments:
Post a Comment