In this article I will explain what application object is and I will explain how we will use application objects in asp.net.
Today I am writing this post to explain about application object in asp.net. In one of the interview I got question like what application object is and where we will use application object in asp.net.
<%@ Application Language="C#" %> <script runat="server"> void Application_Start(object sender, EventArgs e) { // Code that runs on application startup Application["UserID"] = "SureshDasari"; } </script> |
<html> <head> <title>Application Object Sample</title> </head> <body> <form id="form1" runat="server"> <asp:Label id="lblText" runat="server"></asp:Label> </form> </body> </html> |
public void Page_Load(object sender, EventArgs e) | |
{ this.lblText.Text = "UserName: " + Application["UserID"] + "<br>"; } | |
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
17 comments :
Thanks for the valuable education!
hp 1020 driver
Hi Suresh
I am really a great fan of your blog.
I just want to ask one question. How to compress Whole directory or folder in asp.net
Thanks in advance.
Dheeraj Bansal
hi suresh
thank u
nice...
tanks a lot suresh garu....
very impressive article suresh
thanks®ards
Hareesh.A
thanks for suggestion this gives me help .......
thanks for the tip...good one
GOOD one.more impresive
amazing blogs yaar...
Love you yaar .. Tanx for ur Blog... really its so valuable for me
Love you yaar .. Tanx for ur Blog... really its so valuable for me
Good job for valuable information.
Meeru telugu varu anukunta... me post lu chala baguntai andi....chala usefull posts inka simple ga arthamayye posts pedataru meeru...Dhanyavadalu...
Its really nice got more ideas...........
More valuable for beginners...............
thanks alot ....