String objects are immutable, which means that once they are created they cannot be changed. When we use one of the methods of the String class, we create a new string object.
For example: (String strSen = “hello”; //Creates a new object).
When we concatenate any other words along with strSen variable it does not actually modify the strSen variable, instead it creates a whole new string.
For example: strSen = strSen + “Hello”, create a new string.
StringBuilder are mutable class, which means when concatenate any text to the variable it allows us to modify the original value without creating a new object.
You can use StringBuilder's Append () method to use concatenation.
Saturday, August 21, 2010
Tuesday, July 27, 2010
Session Management
Session is a important object to store serializable information that must be accesible in all pages in the web application.
It has some important points which are as;
It has some important points which are as;
- It is tracked by the 120 bit indentifier
- Session is tracked with the session ID in two ways
- By cookies (session is stored in special cookie ASP.NET_SessionId)
- By modified url
- The session default time-out in 20 mintues
- Session in controlled in four modes
- InProc default mode
- StateServer: Here a separate window service handles it known as "ASP.NET State Service".
- SQLServer:It is best mode for storage, it is persite event in case of failures.
To make this enable we use a tool called "aspnet_regsql.exe".The default database for storage of session is ASPState - Custom
Tuesday, July 20, 2010
HTML SPECIAL CHARACTERS
| Punctuation | HTML Entity (case sensitive) | ISO Latin-1 code | name or meaning |
|---|---|---|---|
| – | – | – | en dash |
| — | — | — | em dash |
| ¡ | ¡ | ¡ | inverted exclamation |
| ¿ | ¿ | ¿ | inverted question mark |
| " | " | " | quotation mark |
| “ | “ | “ | left double curly quote |
| ” | ” | ” | right double curly quote |
| ‘ | ‘ | ‘ | left single curly quote |
| ’ | ’ | ’ | right single curly quote |
| « » | « » | « » | guillemets (used as quotation marks in some languages, e.g., French) |
| (Its there, but you can't see it!) | |   | non-breaking space |
| Symbols | |||
| & | & | & | ampersand |
| ¢ | ¢ | ¢ | cent |
| © | © | © | copyright |
| ÷ | ÷ | ÷ | divide |
| > | > | > | greater than |
| < | < | < | less than |
| µ | µ | µ | micron |
| · | · | · | middle dot |
| ¶ | ¶ | ¶ | pilcrow (paragraph sign) |
| ± | ± | ± | plus/minus |
| € | € | € | Euro |
| £ | £ | £ | British Pound Sterling |
| ® | ® | ® | registered |
| § | § | § | section |
| ™ | ™ | ™ | trademark |
| ¥ | ¥ | ¥ | Japanese Yen |
| Diacritics | |||
| á Á | á Á | á Á | lower-case "a" with acute accent upper-case "A" with acute accent |
| à À | à À | à À | lower-case "a" with grave accent upper-case "A" with grave accent |
| â Â | â Â | â Â | lower-case "a" with circumflex upper-case "A" with circumflex |
| å Å | å Å | å Å | lower-case "a" with ring upper-case "A" with ring |
| ã Ã | ã Ã | ã Ã | lower-case "a" with tilde upper-case "A" with tilde |
| ä Ä | ä Ä | ä Ä | lower-case "a" with diaeresis/umlaut upper-case "A" with diaeresis/umlaut |
| æ Æ | æ Æ | æ Æ | lower-case "ae" ligature upper-case "AE" ligature |
| ç Ç | ç Ç | ç Ç | lower-case "c" with cedilla upper-case "C" with cedilla |
| é É | é É | é É | lower-case "e" with acute accent upper-case "E" with acute accent |
| è È | è È | è È | lower-case "e" with grave accent upper-case "E" with grave accent |
| ê Ê | ê Ê | ê Ê | lower-case "e" with circumflex upper-case "E" with circumflex |
| ë Ë | ë Ë | ë Ë | lower-case "e" with diaeresis/umlaut upper-case "E" with diaeresis/umlaut |
| í Í | í Í | í Í | lower-case "i" with acute accent upper-case "I" with acute accent |
| ì Ì | ì Ì | ì Ì | lower-case "i" with grave accent upper-case "I" with grave accent |
| î Î | î Î | î Î | lower-case "i" with circumflex upper-case "I" with circumflex |
| ï Ï | ï Ï | ï Ï | lower-case "i" with diaeresis/umlaut upper-case "I" with diaeresis/umlaut |
| ñ Ñ | ñ Ñ | ñ Ñ | lower-case "n" with tilde upper-case "N" with tilde |
| ó Ó | ó Ó | ó Ó | lower-case "o" with acute accent upper-case "O" with acute accent |
| ò Ò | ò Ò | ò Ò | lower-case "o" with grave accent upper-case "O" with grave accent |
| ô Ô | ô Ô | ô Ô | lower-case "o" with circumflex upper-case "O" with circumflex |
| ø Ø | ø Ø | ø Ø | lower-case "o" with slash upper-case "O" with slash |
| õ Õ | õ Õ | õ Õ | lower-case "o" with tilde upper-case "O" with tilde |
| ö Ö | ö Ö | ö Ö | lower-case "o" with diaeresis/umlaut upper-case "O" with diaeresis/umlaut |
| ß | ß | ß | ess-tsett |
| ú Ú | ú Ú | ú Ú | lower-case "u" with acute accent upper-case "U" with acute accent |
| ù Ù | ù Ù | ù Ù | lower-case "u" with grave accent upper-case "U" with grave accent |
| û Û | û Û | û Û | lower-case "u" with circumflex upper-case "U" with circumflex |
| ü Ü | ü Ü | ü Ü | lower-case "u" with diaeresis/umlaut upper-case "U" with diaeresis/umlaut |
| ÿ | ÿ | ÿ | lower-case "y" with diaeresis/umlaut |
| ´ ` | ´ ` | acute accent with no letter grave accent/reversed apostrophe with no letter | |
Sites for learning Asp.Net
These are the good sites to learn the Asp.Net
1.www.asp.net best site to learn asp.net
2.
http://www.dotnetspider.com/tutorials/TutorialListing.aspx?group=AspNet&PageNumber=1
3. http://www.w3schools.com/aspnet/default.asp
4. http://www.csharpfriends.com/
5 .http://www.java2s.com/Tutorial/ASP.NET/CatalogASP.NET.htm
6http://quickstarts.asp.net/QuickStartv20/aspnet/Default.aspx
1.www.asp.net best site to learn asp.net
2.
http://www.dotnetspider.com/tutorials/TutorialListing.aspx?group=AspNet&PageNumber=1
3. http://www.w3schools.com/aspnet/default.asp
4. http://www.csharpfriends.com/
5 .http://www.java2s.com/Tutorial/ASP.NET/CatalogASP.NET.htm
6http://quickstarts.asp.net/QuickStartv20/aspnet/Default.aspx
Monday, July 19, 2010
Using Repeator to show data in Xml files
1. Firstly make xml file "data.xml"
<?xml version="1.0" encoding="utf-8" ?>
<catalog>
<cd>
<Name>Veer</Name>
<Id>10</Id>
</cd>
<cd>
<Name>Karan</Name>
<Id>11</Id>
</cd>
</catalog>
2. Add the repeator control as
form id="form1" runat="server">
<asp:Repeater ID="cdcatalog" runat="server">
<HeaderTemplate>
<table border="2px" width="100%">
<tr>
<th>Name</th>
<th>ID</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,"Name") %></td>
<td><%#DataBinder.Eval(Container.DataItem,"Id") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</form>
3. Now in page_load event read xml file by dataset and add that dataset as reference to the repeator control
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.ReadXml(MapPath("data.xml"));
// cdcatalog in ID of the repeator control
cdcatalog.DataSource=ds;
cdcatalog.DataBind();
}
<?xml version="1.0" encoding="utf-8" ?>
<catalog>
<cd>
<Name>Veer</Name>
<Id>10</Id>
</cd>
<cd>
<Name>Karan</Name>
<Id>11</Id>
</cd>
</catalog>
2. Add the repeator control as
form id="form1" runat="server">
<asp:Repeater ID="cdcatalog" runat="server">
<HeaderTemplate>
<table border="2px" width="100%">
<tr>
<th>Name</th>
<th>ID</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,"Name") %></td>
<td><%#DataBinder.Eval(Container.DataItem,"Id") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</form>
3. Now in page_load event read xml file by dataset and add that dataset as reference to the repeator control
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.ReadXml(MapPath("data.xml"));
// cdcatalog in ID of the repeator control
cdcatalog.DataSource=ds;
cdcatalog.DataBind();
}
Subscribe to:
Posts (Atom)