0% found this document useful (0 votes)
7 views

AJAX & Cache

Uploaded by

m.abdelmohdy79
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

AJAX & Cache

Uploaded by

m.abdelmohdy79
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

AJAX

?What is AJAX

 IT’s a web development technique is uses on the client-side to create


asynchronous Web applications, which means that you are able to
update a web page without reloading the page.
?How to use

 Example:
We need to make a button, and a label , press the button then
displays “Hi” (without reloading the web page).
12 4

Add this line:


<asp:ScriptManager ID="MainScriptManager" runat="server" />

It is the key component that coordinates the use of JavaScript for the
Microsoft AJAX Library.

5 3
6

Then drag a button, and a label on you update panel….the button, and the
label must be contained in your update panel.
Then double click on the button, and write next code statements.
7

After writing this code, run your project, and you will notice that when press
this button, word “Hi ” is added to that label (without reloading the web page)
Cache
?What is cache

 It’sthe ability to move through web page carrying values,


that you can get a value from a page, then use it in another
one.
?How to use

 Example:
We need to make a button, and a textbox , write a word in the
textbox, and press the button then move to next page and
displays in a label “Hi “ + word in the textbox.
As you notice there are two forms ,the current form contains a textbox, and a
button, now double click on the button
Session is an object which store values, and move with these values through
pages
Syntax: Session[“any word you want”]= a string, or a number

Response.Redirect(“page name .aspx”) is used to move to another page.


Notice that we now in the 2nd form and there is a label, which should
displays the name written in previous form. Now F7 to write the code
As you notice the text of Label1 equals Session of “word” the same name
we used in previous form, now run your code at test
Thanks

You might also like