Click here to Skip to main content
15,898,035 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: thumbnail enlargement in asp.net Pin
_AK_31-Aug-06 2:08
_AK_31-Aug-06 2:08 
AnswerRe: thumbnail enlargement in asp.net Pin
eggsovereasy31-Aug-06 4:06
eggsovereasy31-Aug-06 4:06 
QuestionFormsAuthentication's RedirectToLoginPage Method Pin
seee sharp31-Aug-06 0:37
seee sharp31-Aug-06 0:37 
AnswerRe: FormsAuthentication's RedirectToLoginPage Method Pin
minhpc_bk31-Aug-06 15:20
minhpc_bk31-Aug-06 15:20 
GeneralRe: FormsAuthentication's RedirectToLoginPage Method Pin
seee sharp5-Sep-06 21:58
seee sharp5-Sep-06 21:58 
QuestionDropDownList coloring in ASP.Net Pin
coolestCoder31-Aug-06 0:07
coolestCoder31-Aug-06 0:07 
AnswerRe: DropDownList coloring in ASP.Net Pin
_AK_31-Aug-06 0:13
_AK_31-Aug-06 0:13 
AnswerRe: DropDownList coloring in ASP.Net Pin
jitu gupta31-Aug-06 2:28
jitu gupta31-Aug-06 2:28 
Hi Anant,

this is the code which solve your problem.

private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
strConn="Data Source=localhost;uid=sa;pwd=;Initial Catalog=northwind";
mycn = new SqlConnection(strConn);
myda = new SqlDataAdapter ("Select * FROM CategoryTable ", mycn);
ds = new DataSet();
myda.Fill (ds,"Table");

DropDownList1.DataSource =ds.Tables [0] ;
DropDownList1.DataTextField =ds.Tables[0].Columns["CategoryName"].ColumnName.ToString();
DropDownList1.DataValueField =ds.Tables[0].Columns["CategoryId"].ColumnName.ToString();
DropDownList1.DataBind () ;

for (int i =0;i < DropDownList1.Items.Count ;i++ )
{
DropDownList1.Items[i].Attributes.Add("style", "color:" + ds.Tables[0].Rows[i]["CategoryColor"].ToString () );
}
}
}

Hope this will solve your problem.
please let me know if any problem arise
bye
GeneralRe: DropDownList coloring in ASP.Net Pin
coolestCoder31-Aug-06 2:41
coolestCoder31-Aug-06 2:41 
QuestionScript Tags Pin
mcgann31-Aug-06 0:02
mcgann31-Aug-06 0:02 
AnswerRe: Script Tags Pin
Sathesh Sakthivel31-Aug-06 0:11
Sathesh Sakthivel31-Aug-06 0:11 
QuestionCall to .Net experts..... Server Execution Failed! Pin
Avanika Gupta30-Aug-06 23:45
Avanika Gupta30-Aug-06 23:45 
QuestionError: the virtual path maps to another application, Pin
Kunwar Ashok Singh30-Aug-06 23:43
Kunwar Ashok Singh30-Aug-06 23:43 
AnswerRe: Error: the virtual path maps to another application, Pin
_AK_30-Aug-06 23:49
_AK_30-Aug-06 23:49 
QuestionDatagrid problem Pin
Nagraj Naik30-Aug-06 23:25
Nagraj Naik30-Aug-06 23:25 
AnswerRe: Datagrid problem Pin
_AK_31-Aug-06 1:49
_AK_31-Aug-06 1:49 
QuestionHow to get Text from audio File [modified] Pin
swapnilbhavsar30-Aug-06 23:02
swapnilbhavsar30-Aug-06 23:02 
AnswerRe: How to get Text from audio File Pin
CWIZO31-Aug-06 2:20
CWIZO31-Aug-06 2:20 
QuestionHow to develop HL7 compatible programs Pin
atulxxx30-Aug-06 22:58
atulxxx30-Aug-06 22:58 
AnswerRe: How to develop HL7 compatible programs Pin
Not Active31-Aug-06 5:21
mentorNot Active31-Aug-06 5:21 
AnswerRe: How to develop HL7 compatible programs Pin
Not Active1-Sep-06 2:32
mentorNot Active1-Sep-06 2:32 
QuestionCross browser testing with Netscape Pin
RichardGrimmer30-Aug-06 22:44
RichardGrimmer30-Aug-06 22:44 
QuestionHi Every Body.... Pin
Gaurav Lal30-Aug-06 22:42
Gaurav Lal30-Aug-06 22:42 
AnswerHi Dr Nick Pin
J4amieC30-Aug-06 23:28
J4amieC30-Aug-06 23:28 
AnswerRe: Hi Every Body.... Pin
psamy31-Aug-06 2:04
psamy31-Aug-06 2:04 

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.