Click here to Skip to main content
15,888,166 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: sorting table Pin
AhsanS29-May-09 0:21
AhsanS29-May-09 0:21 
GeneralRe: sorting table Pin
prateekfgiet29-May-09 0:25
prateekfgiet29-May-09 0:25 
GeneralRe: sorting table Pin
Baran M29-May-09 0:42
Baran M29-May-09 0:42 
QuestionHelp!! Pin
WebMaster29-May-09 0:15
WebMaster29-May-09 0:15 
AnswerRe: Help!! Pin
Manas Bhardwaj29-May-09 1:01
professionalManas Bhardwaj29-May-09 1:01 
GeneralRe: Help!! Pin
Baran M29-May-09 1:08
Baran M29-May-09 1:08 
AnswerRe: Help!! Pin
Baran M29-May-09 1:02
Baran M29-May-09 1:02 
QuestionFunction return same value if I dont trace. Pin
JayKhatri29-May-09 0:12
JayKhatri29-May-09 0:12 
Hi Experts,

I have developed this newbie pass generator system. When I click on the password generator button. It generate password for its relevant row. This is working fine when I use traces. If I remove it shows all the passwords same.

protected void PassGen_Click(object sender, EventArgs e)
{
string s,temp="";
int x;
string pass;
GridView gw = (GridView)form1.FindControl("LoginView1").FindControl("GridView1");
for (int i=0; i< gw.Rows.Count; i++)
{
CheckBox chkUpdate = (CheckBox)gw.Rows[i].Cells[0].FindControl("CheckBox1");
if (chkUpdate != null)
{
if (chkUpdate.Checked)
{
s = gw.Rows[i].Cells[6].Text;
x = 5 - s.Length;
for (int k = 0; k < x; k++)
{
temp = "0" + temp;
}
gw.Rows[i].Cells[1].Text=gw.Rows[i].Cells[5].Text + temp + gw.Rows[i].Cells[6].Text;
temp = "";

Random rand = new Random();
gw.Rows[i].Cells[2].Text = password();
}
else
{
gw.Rows[i].Cells[1].Text = "";
gw.Rows[i].Cells[2].Text = "";
}
}
}
}
private string password()
{
int d;
int maxLen = 7;
string pass="";
int i;
Random rand = new Random();
for (i = 0; i < maxLen; i++)
{
d = Convert.ToInt32(Math.Floor(rand.NextDouble() * 100));
if ((d >= 48 && d <= 57) || (d >= 65 && d <= 90) || (d >= 97 && d <= 122))
{
pass = pass + Convert.ToChar(d);}
else{
i--;
}
}
return Convert.ToString(pass);
}
}

please let me have the solutions.

Thanks & Best Regards

Jay Khatri
AnswerRe: Function return same value if I dont trace. Pin
Baran M29-May-09 0:52
Baran M29-May-09 0:52 
GeneralRe: Function return same value if I dont trace. [modified] Pin
JayKhatri29-May-09 1:44
JayKhatri29-May-09 1:44 
GeneralRe: Function return same value if I dont trace. Pin
JayKhatri2-Jun-09 2:11
JayKhatri2-Jun-09 2:11 
Questionconfirm and message box Pin
jainiraj28-May-09 23:44
jainiraj28-May-09 23:44 
AnswerRe: confirm and message box Pin
padmanabhan N28-May-09 23:50
padmanabhan N28-May-09 23:50 
QuestionHow to freeze the web page when displaying progress bar? Pin
Somnath Sen28-May-09 21:10
Somnath Sen28-May-09 21:10 
AnswerRe: How to freeze the web page when displaying progress bar? Pin
Christian Graus28-May-09 21:14
protectorChristian Graus28-May-09 21:14 
AnswerRe: How to freeze the web page when displaying progress bar? Pin
Abhishek Sur28-May-09 22:14
professionalAbhishek Sur28-May-09 22:14 
QuestionNamed anchor link Pin
farogh haider28-May-09 21:06
farogh haider28-May-09 21:06 
AnswerRe: Named anchor link Pin
Christian Graus28-May-09 21:16
protectorChristian Graus28-May-09 21:16 
GeneralRe: Named anchor link Pin
farogh haider28-May-09 21:29
farogh haider28-May-09 21:29 
GeneralRe: Named anchor link Pin
Christian Graus28-May-09 21:42
protectorChristian Graus28-May-09 21:42 
GeneralRe: Named anchor link Pin
ScottM128-May-09 22:07
ScottM128-May-09 22:07 
GeneralRe: Named anchor link Pin
Matt Cavanagh29-May-09 2:42
Matt Cavanagh29-May-09 2:42 
Questionhow to resize whole aspx page Pin
Jaymm28-May-09 20:47
Jaymm28-May-09 20:47 
AnswerRe: how to resize whole aspx page Pin
adatapost28-May-09 20:58
adatapost28-May-09 20:58 
AnswerRe: how to resize whole aspx page Pin
Mohit111028-May-09 21:34
professionalMohit111028-May-09 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.