Click here to Skip to main content
15,922,145 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to embed Flash Player in asp.net web page Pin
sourabhgarg19-Feb-09 17:38
sourabhgarg19-Feb-09 17:38 
AnswerRe: How to embed Flash Player in asp.net web page Pin
lobbychmd19-Feb-09 19:34
lobbychmd19-Feb-09 19:34 
Questionhow to retrieve data Pin
JAYRAJ GIRI19-Feb-09 16:42
JAYRAJ GIRI19-Feb-09 16:42 
AnswerRe: how to retrieve data Pin
thomas_joyee19-Feb-09 17:32
thomas_joyee19-Feb-09 17:32 
AnswerRe: how to retrieve data Pin
rakeshs31219-Feb-09 19:28
rakeshs31219-Feb-09 19:28 
AnswerRe: how to retrieve data Pin
Christian Graus19-Feb-09 22:02
protectorChristian Graus19-Feb-09 22:02 
Questionretrieve check in data base Pin
JAYRAJ GIRI19-Feb-09 16:37
JAYRAJ GIRI19-Feb-09 16:37 
AnswerRe: retrieve check in data base Pin
Christian Graus19-Feb-09 22:14
protectorChristian Graus19-Feb-09 22:14 
This is the worst code I've seen in a long time. SO many things wrong with it. If someone I paid wrote this, I'd fire them. In fact, there's no way I'd have hired them.

Your checkboxes are called chk1, chk2, chk3, chk4, chk5, and chk6 ? Are you hoping for future outsourcing work on the basis that your code is unreadable ?

JAS GIRI wrote:
string d;
for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
{
for (int j = 1; j <= ds.Tables[0].Columns.Count-1; j++)
{
d = ds.Tables[0].Rows[i].ItemArray[j].ToString();


You create d outside the loop but only use it inside. you use <= x-1 instead of < x, you start j from 1 instead of 0 ( is that right ), you use i and j instead of meaningful names, what a mess.

JAS GIRI wrote:
protected void multchk(CheckBox ch1,CheckBox ch2,CheckBox ch3,string []str)
{
if (Cnt==1)
{
if (str[0] == "1")
ch1.Checked = true;
if (str[0] == "2")
ch2.Checked=true;
if (str[0] == "3")
ch3.Checked = true;
}
if (Cnt==2)
{
if (str[0] == "1" || str[1] == "1")
ch1.Checked = true;
if (str[0] == "2" || str[1] == "2")
ch2.Checked = true;
if (str[0] == "3" || str[1] == "3")
ch3.Checked = true;
}
if (Cnt==3)
{
if (str[0] == "1" || str[1] == "1" || str[2] == "1")
ch1.Checked = true;
if (str[0] == "1" || str[1] == "2" || str[2] == "3")
ch2.Checked = true;
if (str[0] == "1" || str[1] == "2" || str[2] == "3")
ch3.Checked = true;
}
}


The logic surrounding Cnt is poorly implemented. Again, it's like you're trying to write spaghetti code.

Perhaps if you in one place posted your crappy code, some notes as to what you're trying to do, an explanation of the data you're using, why you can't use a checkboxlist, and what exactly this code does, as opposed to what you expect it to do, perhaps then someone who feels like doing your job for you, might have what they need in order to help. If you fail to do this in the next day, then I'd suggest you're beyond any sort of help, and should just give up.

Christian Graus

Driven to the arms of OSX by Vista.

QuestionMSSQL server in visual studio 2008.. Pin
rosae61919-Feb-09 15:28
rosae61919-Feb-09 15:28 
AnswerRe: MSSQL server in visual studio 2008.. Pin
N a v a n e e t h19-Feb-09 16:17
N a v a n e e t h19-Feb-09 16:17 
Questionwebserver has stopped working Pin
btshiva19-Feb-09 10:46
btshiva19-Feb-09 10:46 
AnswerRe: webserver has stopped working Pin
Christian Graus19-Feb-09 11:14
protectorChristian Graus19-Feb-09 11:14 
QuestionDictionary&lt;string,&gt; to Dictionary&lt;int,&gt; Pin
Terick19-Feb-09 8:03
Terick19-Feb-09 8:03 
AnswerRe: Dictionary&lt;string,&gt; to Dictionary&lt;int,&gt; Pin
vaghelabhavesh19-Feb-09 8:16
vaghelabhavesh19-Feb-09 8:16 
GeneralRe: Dictionary&lt;string,&gt; to Dictionary&lt;int,&gt; Pin
Terick19-Feb-09 8:46
Terick19-Feb-09 8:46 
GeneralRe: Dictionary&lt;string,&gt; to Dictionary&lt;int,&gt; Pin
vaghelabhavesh19-Feb-09 9:01
vaghelabhavesh19-Feb-09 9:01 
Questionhow to use session method in an application Pin
monasri19-Feb-09 5:10
monasri19-Feb-09 5:10 
AnswerRe: how to use session method in an application Pin
Calin Tatar19-Feb-09 5:55
Calin Tatar19-Feb-09 5:55 
AnswerRe: how to use session method in an application Pin
rakeshs31219-Feb-09 20:03
rakeshs31219-Feb-09 20:03 
Questionstore data in database use check box Pin
JAYRAJ GIRI19-Feb-09 3:27
JAYRAJ GIRI19-Feb-09 3:27 
AnswerRe: store data in database use check box Pin
Vimalsoft(Pty) Ltd19-Feb-09 3:59
professionalVimalsoft(Pty) Ltd19-Feb-09 3:59 
AnswerRe: store data in database use check box Pin
Christian Graus19-Feb-09 9:23
protectorChristian Graus19-Feb-09 9:23 
GeneralRe: store data in database use check box Pin
Calin Tatar19-Feb-09 10:55
Calin Tatar19-Feb-09 10:55 
GeneralRe: store data in database use check box Pin
Christian Graus19-Feb-09 11:28
protectorChristian Graus19-Feb-09 11:28 
GeneralRe: store data in database use check box Pin
Calin Tatar19-Feb-09 14:45
Calin Tatar19-Feb-09 14:45 

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.