When each user browse a Page the unique Session Object is created….Session Object is idendified by unique session Id. The Session ID is Sent back to the client in the form of cookies. Some browser does not support cookies.. So that we can set cooliless=true. For that… the Session ID Sent to the URL QueryString.
Archive for the ‘ASP.NET’ Category
Cookiless Session State in ASP.NET
Posted in ASP.NET on July 20, 2008 | Leave a Comment »
To Change the gridview lines color in ASP.NET
Posted in ASP.NET on July 20, 2008 | Leave a Comment »
<asp:DataGrid ID=”DataGrid1″ runat=”server” AutoGenerateColumns=”False” BorderColor=”Black” BorderStyle=”Solid” BorderWidth=”1px” Width=”300px” PageSize=”7″> <Columns> <asp:TemplateColumn ItemStyle-BorderColor=”blue” ItemStyle-BorderStyle=”solid” ItemStyle-BorderWidth=”2px”> <ItemTemplate> <center> <asp:Label ID=”Label1″ runat=”server” Text=’Hello’></asp:Label> </center> </ItemTemplate> <HeaderStyle HorizontalAlign=”Center” /> </asp:TemplateColumn> <AlternatingItemStyle BackColor=”Gainsboro” BorderColor=”White” /> <HeaderStyle BackColor=”Gray” /> <EditItemStyle BorderColor=”White” /> <ItemStyle BorderColor=”White” /> </asp:DataGrid>
Region Based Default Button in ASP.NET
Posted in ASP.NET on July 20, 2008 | Leave a Comment »
EmailTextBox.Attributes.Add(“onKeyPress”, “javascript:if (event.keyCode == 13) __doPostBack(‘” + LoginButton.UniqueID + “‘,”)”); Another one Simple Method is use the Panel inside it put the Default Button Focus To It <asp:Panel ID=”Hi” runat=”server” DefaultButton=”Button1″> You can also kept the focus coding at the Form tag itself <form id=”form1″ runat=”server” defaultbutton=”Button3″ >
To Send an XML stream to another Page in ASP.NET
Posted in ASP.NET on July 20, 2008 | Leave a Comment »
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; using System.Net; public partial class SendStream : System.Web.UI.Page { HttpWebRequest MyRequest; #region Page_Load protected void Page_Load(object sender, EventArgs e) { } #endregion #region Send_Stream protected [...]
Using Block inside the void Main in c#.NET,ASP.NET
Posted in ASP.NET, C#.NET on July 20, 2008 | Leave a Comment »
We can’t able to use the using block inside the public static void main(String args[]) { using (ReadingFile Rf = new ReadingFile()) { Rf.ReadFile(); } } Like the above usage.Because the System.IDisposible implisitely called inside the static void main(String args[]) function.
Inner Class,Creating an Instance Of the Class
Posted in ASP.NET, C#.NET on July 20, 2008 | Leave a Comment »
using System; using System.Collections.Generic; using System.Text; namespace ConsoleExample { public class OuterClass { public void OuterClassFunction() { Console.WriteLine(“I am in Outer Class Function”); } //Reinitialize the class public InnerClass abc() { return new InnerClass(); } public class InnerClass { public OuterClass OutC() { return new OuterClass(); } public string PublicInner; private string privateInner; public InnerClass() [...]
Variable Passing in C#.Net
Posted in ASP.NET, C#.NET on July 20, 2008 | Leave a Comment »
class PropertiesExplaination { void OrdinaryAccessMethod(params int[] Params) { Console.WriteLine(Params.Length); } static void Main(string[] args) { PropertiesExplaination Obj = new PropertiesExplaination(); Obj.a = 1; Obj.OrdinaryAccessMethod(Obj.a,Obj.a+1,Obj.a+3); Console.Read(); } } For the above Example PropertiesExplaination is a Class Name and OrdinaryAccessMethod is a sample method. params-> is a Keyword to Pass a Array of Variables. For the above [...]
Session Time Out Limit
Posted in ASP.NET on May 6, 2008 | Leave a Comment »
Session Default Time Out is 20 minutes Maximum we can set up to 4,000 years,,,,, Session.TimeOut=Minutes. 2,147,483,647
Instead of DataBinder.Eval use DataRowView
Posted in ASP.NET on May 6, 2008 | Leave a Comment »
<%# ((DataRowView)Container.DataItem)["name1"] %> This One is the Best One……..While using DataBinder.Eval() If your Record exeecds than 100 Rows..It Will become a Problem.More duplication Will Occur.
To Change the GridView Lines Color
Posted in ASP.NET on May 6, 2008 | Leave a Comment »
<asp:DataGrid ID=”DataGrid1″ runat=”server” AutoGenerateColumns=”False” BorderColor=”Black” BorderStyle=”Solid” BorderWidth=”1px” Width=”300px” PageSize=”7″> <Columns> <asp:TemplateColumn ItemStyle-BorderColor=”blue” ItemStyle-BorderStyle=”solid” ItemStyle-BorderWidth=”2px”> <ItemTemplate> <center> <asp:Label ID=”Label1″ runat=”server” Text=’Hello’></asp:Label> </center> </ItemTemplate> <HeaderStyle HorizontalAlign=”Center” /> </asp:TemplateColumn> <AlternatingItemStyle BackColor=”Gainsboro” BorderColor=”White” /> <HeaderStyle BackColor=”Gray” /> <EditItemStyle BorderColor=”White” /> <ItemStyle BorderColor=”White” /> </asp:DataGrid>