Presenter:Joe Stagner
Learn how a ScriptManagerProxy enables a content page to pass references to the ScriptManager placed on its ASP.NET master page, allowing each content page to define its own AJAX behavior.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
This video on demonstrate these of the script manager proxy control as part of the Microsoft ASP net 2 0 extensions for Ajax now is the proxy is used to solve a particular category of problem and that is that in this Monday of a web applications development particularly with the ASP net often we want to use an included content horror or content is contained within other content and in the case of ASP net is most often a master pages to the idea behind Master pages I can define some common look and feel include common CSS file may be at common functionality like on authentication mechanism so user login some breadcrumbs may be a menuing system and ought that I can derive all the other pages in my website from that one master page and I have all of that universal code contained in 1 Convenient Place now obviously excessive for Ajax enabling our applications to put some Ajax functionality in the
Minute 1
Page for example it may be authentication mechanism must be defined in a master page so the problem lies in that every Microsoft Ajax enabled ASP net page has to have an instance of the script manager control on it but only one instance so if you need to use some Ajax functionality in her Master page in this message is going to be defined as they are not in the subsequent page the page that derives from that master page and that means that if we look at the sample here on every time we want to access something like a web service or some external JavaScript we add it to the script of the services section in our script manager by if we re going to use this master page derivative mechanism that s obvious part of ASP net 2 0 then we don t want to have to define a service reference for every web
Minute 2
Servers that are woke up that any page at our website is going to use ISA problem is this the better declaration has to be our masterpiece of the wiki use them as a Jackson or master page but the simple services only to be called from one page we don t want the over in the overhead of having to define every service reference in every script reference to any page in our website is going to use here in the script editor declaration which would live in our master page so the solution to this is the script manager proxy so yeah that existingASP net application on all this goes so far is a display of Cisco services that simple service and all it does is its defiant defined as a script service and all does is taken up a parameter and ee the if a parameter along with the teletext back so well look at is how we use a script manager proxy in a
Minute 3
aspx page that s derived from a Master page so that I don t have to define the script reference to our web service at the Master page level so let s add a master page and there the Master page here that so this content placeholder that s where the content doesn t arrive will go so in our default aspx page for example of that is what goes in this content placeholder area just to show out a are an example of using occupation of an obviously not going to not going to worry about the aesthetics of this but so does a header area hears her footer area and maybe the header area here for the top will have no user and password a universal log in so in order to do that we need to have a script manager on her page
Minute 4
Lets out a script manager to the page got to the in the syntax extensions to tab and you run a script manager drop of the page so I can do a elegant new HSL program here in my master page well I derive from this and call the civil service without having to include it as a service reference here in my script manager definition so was gotten out of the page in this is as can be a default aspx page memo to select the master page that was select the master page that I just created their at least one design is a footer area here is our header area and we want a lot in this content page this is where we are going to do our own to our page specific development so a couple things and a good element is no work here so I can Ajax enabled for this contest went out of any HTML text box not an ASP net text control just a
Minute 5
Is the standard text box and then a input buttons and then will put a another text box in the page you re and I want to be able to specify that this page is called a simple service but don t again want to live defined in the script manager cell I can go down to my toolbox of the Mighty Ducks extensions to look sad and grad this controlled sigh settled the script editor proxy dropped out my page and remember this is the continuity services via default aspx area working with in the great out area is a visual representation of the Master page and hit a script editor proxy I can say I wanted to find scripts also a services section pics I can say services at
Minute 6
Minute 7
Are defined here in the snippet and this is this is content that I used in the i have a video on using a callback on doing network callbacks crisis is just a calling a proxy to the point here is that on unable to access this simply by including a script editor proxy control says they look for the look of the strip manager elsewhere on the page and specifying the service reference now on at one time the content from the Master page in the content from the derived page default aspx Americans get my urge to the script manager is all on the page at browser time and as for manager proxies refers to the essence of the management didn t see you up with this code does is pop of alert box but let s use the second Xbox would place on the page and output the value the return value and they re so say document get element
Minute 8
ID should be text to the Herald to say the inner text let s set that equal to a post when we got back from the service will them and run us in their dislike that so this is how you can use a script in script editor control so that you can seduce Master pages still use them as a tax code at the Master page level but have a good programming organization by using strip manager proxy to define at the derived page level the specific scripts and services you want program against on that particular page
Click here to go to original video page
Sunday, July 13, 2008
Video: How Do I: Use an ASP.NET AJAX ScriptManagerProxy?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment