Click here to Skip to main content
16,008,469 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Possible? Keep position absolute consistent in mozilla? Pin
Justincc5-Sep-07 3:49
professionalJustincc5-Sep-07 3:49 
GeneralRe: Possible? Keep position absolute consistent in mozilla? Pin
George L. Jackson5-Sep-07 8:04
George L. Jackson5-Sep-07 8:04 
AnswerRe: Possible? Keep position absolute consistent in mozilla? Pin
Justincc5-Sep-07 4:38
professionalJustincc5-Sep-07 4:38 
QuestionEvent Firing?? Pin
tadhg884-Sep-07 4:51
tadhg884-Sep-07 4:51 
QuestionSetting Permissions on an MDB File Pin
Brendan Vogt3-Sep-07 23:13
Brendan Vogt3-Sep-07 23:13 
AnswerRe: Setting Permissions on an MDB File Pin
Fred_Smith3-Sep-07 23:23
Fred_Smith3-Sep-07 23:23 
Questionembed flash on button click in c#.net2.0 Pin
harryforum3-Sep-07 22:46
harryforum3-Sep-07 22:46 
QuestionProblem during User Authentication. Pin
nagendrathecoder3-Sep-07 20:21
nagendrathecoder3-Sep-07 20:21 
Hello friends,

I am developing a login & registration page for a website.
On the login page, i have provided a link for registration page. If the user don't hav username and password for authentication then he/she supposed to register to the website first.

The problem is, control is not transferring to the registration page without authenticating the user i.e i has to authenticate the user first by giving username and password, then only i am able to access Registration page. This is completely wrong logic.

I don't know where the problem is but i am sure it will be a small one. I am also attaching the code of user authentication here.

private void BtnGo_Click(object sender, System.EventArgs e)
{
if(ValidateUser(TextBox1.Text,TextBox2.Text))
{
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;

tkt=new FormsAuthenticationTicket(1,TextBox1.Text,System.DateTime.Now,System.DateTime.Now.AddMinutes(Convert.ToInt32(ConfigurationSettings.AppSettings["timeout"])),CheckBox1.Checked,"Your Custom Date");

cookiestr=FormsAuthentication.Encrypt(tkt);
ck=new HttpCookie(FormsAuthentication.FormsCookieName,cookiestr);

if(CheckBox1.Checked)
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("Test.aspx",true);
}
else
Response.Redirect("login.aspx",true);
}

This is the code for user authentication.
Please someone help me.

Thanks,
Nagendra.
QuestionPROBLE - Uploading 5MB Excel file Pin
hifiger20043-Sep-07 5:07
hifiger20043-Sep-07 5:07 
AnswerRe: PROBLE - Uploading 5MB Excel file Pin
Fred_Smith3-Sep-07 13:16
Fred_Smith3-Sep-07 13:16 
AnswerRe: PROBLE - Uploading 5MB Excel file Pin
hifiger20045-Sep-07 10:47
hifiger20045-Sep-07 10:47 
QuestionTextBox in DataGrid Pin
nandhububbly3-Sep-07 0:11
nandhububbly3-Sep-07 0:11 
QuestionFunction for IFrame Pin
James_Programmer2-Sep-07 21:55
James_Programmer2-Sep-07 21:55 
QuestionImplementing your own map image in c#.net 2.0 to perform city search Pin
harryforum2-Sep-07 19:52
harryforum2-Sep-07 19:52 
Question[Message Deleted] Pin
dream_liner_7e71-Sep-07 12:14
dream_liner_7e71-Sep-07 12:14 
AnswerRe: identify client Pin
Christian Graus1-Sep-07 13:41
protectorChristian Graus1-Sep-07 13:41 
GeneralRe: identify client Pin
dream_liner_7e71-Sep-07 16:12
dream_liner_7e71-Sep-07 16:12 
GeneralRe: identify client Pin
Vasudevan Deepak Kumar2-Sep-07 0:01
Vasudevan Deepak Kumar2-Sep-07 0:01 
GeneralRe: identify client Pin
Vasudevan Deepak Kumar2-Sep-07 0:03
Vasudevan Deepak Kumar2-Sep-07 0:03 
AnswerRe: identify client Pin
Vasudevan Deepak Kumar2-Sep-07 0:02
Vasudevan Deepak Kumar2-Sep-07 0:02 
AnswerRe: [Message Deleted] Pin
Michael Sync2-Sep-07 16:22
Michael Sync2-Sep-07 16:22 
GeneralRe: [Message Deleted] Pin
Vasudevan Deepak Kumar2-Sep-07 19:58
Vasudevan Deepak Kumar2-Sep-07 19:58 
Questionproblem with dependent list boxes Pin
prachishah1-Sep-07 3:55
prachishah1-Sep-07 3:55 
AnswerRe: problem with dependent list boxes Pin
Fred_Smith1-Sep-07 14:07
Fred_Smith1-Sep-07 14:07 
GeneralRe: problem with dependent list boxes Pin
prachishah1-Sep-07 18:25
prachishah1-Sep-07 18:25 

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.