Click here to Skip to main content
15,917,862 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to enable or disables master page's component from its child page. Pin
sunil.n.cs29-May-09 2:06
sunil.n.cs29-May-09 2:06 
GeneralRe: how to enable or disables master page's component from its child page. Pin
souravghosh1829-May-09 2:20
souravghosh1829-May-09 2:20 
GeneralRe: how to enable or disables master page's component from its child page. Pin
Baran M29-May-09 3:42
Baran M29-May-09 3:42 
QuestionRedirecting to web page in another assembly? Pin
Hristiyan29-May-09 0:25
Hristiyan29-May-09 0:25 
AnswerRe: Redirecting to web page in another assembly? Pin
Manas Bhardwaj29-May-09 0:59
professionalManas Bhardwaj29-May-09 0:59 
AnswerRe: Redirecting to web page in another assembly? Pin
sunil.n.cs29-May-09 2:14
sunil.n.cs29-May-09 2:14 
GeneralRe: Redirecting to web page in another assembly? Pin
Hristiyan29-May-09 3:23
Hristiyan29-May-09 3:23 
Questionsorting table Pin
prateekfgiet29-May-09 0:18
prateekfgiet29-May-09 0:18 
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 

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.