Click here to Skip to main content
15,897,185 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Dynamically created controls Pin
Sun Rays28-Nov-07 21:57
Sun Rays28-Nov-07 21:57 
GeneralRe: Dynamically created controls Pin
Raza Hussain29-Nov-07 1:58
Raza Hussain29-Nov-07 1:58 
AnswerRe: Dynamically created controls Pin
Imran Khan Pathan28-Nov-07 21:57
Imran Khan Pathan28-Nov-07 21:57 
AnswerRe: Dynamically created controls Pin
Braulio Dez28-Nov-07 22:45
Braulio Dez28-Nov-07 22:45 
AnswerRe: Dynamically created controls Pin
John-ph29-Nov-07 0:19
John-ph29-Nov-07 0:19 
QuestionProblem with Session Pin
nagendrathecoder28-Nov-07 20:32
nagendrathecoder28-Nov-07 20:32 
AnswerRe: Problem with Session Pin
N a v a n e e t h28-Nov-07 20:34
N a v a n e e t h28-Nov-07 20:34 
GeneralRe: Problem with Session Pin
nagendrathecoder28-Nov-07 20:46
nagendrathecoder28-Nov-07 20:46 
Sure, this is Login Page code.....

private void BtnGo_Click(object sender, System.EventArgs e)
{
Label1.Visible=false;
bool persistcookie=true;

if(ValidateUser(TextBox1.Text,TextBox2.Text))
{
//string globalstrConn="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=iMedia;Integrated Security=SSPI;";

Session["UserName"]=TextBox1.Text;
//This will store the username of the user in this session variable
// We can retrieve this username on different pages by using following code.
// string str=Convert.ToString(Session["UserName"]);

FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;

tkt=new FormsAuthenticationTicket(1,TextBox1.Text,System.DateTime.Now,System.DateTime.Now.AddMinutes(Convert.ToInt32(ConfigurationSettings.AppSettings["timeout"])),persistcookie,"Your Custom Date");
cookiestr=FormsAuthentication.Encrypt(tkt);
ck=new HttpCookie(FormsAuthentication.FormsCookieName,cookiestr);

if(persistcookie)
ck.Expires =tkt.Expiration;
ck.Path =FormsAuthentication.FormsCookiePath;
Response.Cookies.Add(ck);

string strredirect;
strredirect=Request["ReturnUrl"];
if(strredirect==null)
strredirect="login.aspx";
Response.Redirect(ConfigurationSettings.AppSettings["defaultpage"],true);
}
else
{
Label1.Text="Invalid Credentials!";
Label1.Visible=true;
// Response.Redirect("login.aspx",true);
}
}
QuestionASP.NET With C# - Accessing anchor tag through code behind Pin
bin200728-Nov-07 20:11
bin200728-Nov-07 20:11 
AnswerRe: ASP.NET With C# - Accessing anchor tag through code behind Pin
Christian Graus28-Nov-07 21:10
protectorChristian Graus28-Nov-07 21:10 
QuestionASP.NET With C# - Accessing HTML Controls through Code behind Pin
bin200728-Nov-07 20:10
bin200728-Nov-07 20:10 
AnswerRe: ASP.NET With C# - Accessing HTML Controls through Code behind Pin
N a v a n e e t h28-Nov-07 20:14
N a v a n e e t h28-Nov-07 20:14 
AnswerRe: ASP.NET With C# - Accessing HTML Controls through Code behind Pin
_AK_28-Nov-07 20:15
_AK_28-Nov-07 20:15 
Questionpressing F5(refresh button) Pin
Sujit Mandal28-Nov-07 20:04
Sujit Mandal28-Nov-07 20:04 
AnswerRe: pressing F5(refresh button) Pin
N a v a n e e t h28-Nov-07 20:12
N a v a n e e t h28-Nov-07 20:12 
GeneralRe: pressing F5(refresh button) Pin
Sujit Mandal28-Nov-07 23:39
Sujit Mandal28-Nov-07 23:39 
AnswerRe: pressing F5(refresh button) Pin
Michael Sync28-Nov-07 20:13
Michael Sync28-Nov-07 20:13 
GeneralRe: pressing F5(refresh button) Pin
_AK_28-Nov-07 20:16
_AK_28-Nov-07 20:16 
GeneralRe: pressing F5(refresh button) Pin
Michael Sync28-Nov-07 21:02
Michael Sync28-Nov-07 21:02 
GeneralRe: pressing F5(refresh button) Pin
_AK_28-Nov-07 23:16
_AK_28-Nov-07 23:16 
GeneralRe: pressing F5(refresh button) Pin
N a v a n e e t h28-Nov-07 23:26
N a v a n e e t h28-Nov-07 23:26 
GeneralRe: pressing F5(refresh button) Pin
_AK_28-Nov-07 23:28
_AK_28-Nov-07 23:28 
QuestionGridView Calculation Pin
komalcse28-Nov-07 19:46
komalcse28-Nov-07 19:46 
AnswerRe: GridView Calculation Pin
MaruBindiya29-Nov-07 2:17
MaruBindiya29-Nov-07 2:17 
GeneralRe: GridView Calculation Pin
decokin20-Sep-08 21:34
decokin20-Sep-08 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.