Click here to Skip to main content
15,908,455 members
Home / Discussions / C#
   

C#

 
Questionhow can i open an existing excel file as a new document. Pin
amit_8324-Aug-09 22:52
professionalamit_8324-Aug-09 22:52 
Questionnotifyicon help Pin
Erdinc2724-Aug-09 22:37
Erdinc2724-Aug-09 22:37 
AnswerRe: notifyicon help Pin
DaveyM6924-Aug-09 23:08
professionalDaveyM6924-Aug-09 23:08 
GeneralRe: notifyicon help Pin
Erdinc2724-Aug-09 23:37
Erdinc2724-Aug-09 23:37 
GeneralRe: notifyicon help Pin
Erdinc2729-Aug-09 0:56
Erdinc2729-Aug-09 0:56 
Questionam tryin to fill the dropdwn list from the database...but it is not displayin any values..plz help me Pin
ankitjain111024-Aug-09 22:37
ankitjain111024-Aug-09 22:37 
AnswerRe: am tryin to fill the dropdwn list from the database...but it is not displayin any values..plz help me Pin
Nagy Vilmos24-Aug-09 23:09
professionalNagy Vilmos24-Aug-09 23:09 
AnswerRe: am tryin to fill the dropdwn list from the database...but it is not displayin any values..plz help me Pin
Blue_Boy24-Aug-09 23:10
Blue_Boy24-Aug-09 23:10 
While you are adding items inside foreach loop then you don't need to set datasource to dropdownlist.

string connection1 = ConfigurationManager.AppSettings["conn"];<br />
OleDbConnection con1 = new OleDbConnection(connection1);<br />
con1.Open();<br />
<br />
<br />
OleDbDataReader dr;<br />
<br />
string query = "select DISTINCT DEPARTMENT from TIME_DETAILS ";<br />
OleDbDataAdapter da1 = new OleDbDataAdapter(query,con1);<br />
DataSet ds1 = new DataSet();<br />
//da1.Fill(ds1);<br />
OleDbCommand cmd = new OleDbCommand(query,con1);<br />
da1.SelectCommand=cmd;<br />
da1.Fill(ds1,"dept");<br />
DataTable dep=ds1.Tables["dept"];<br />
dr = cmd.ExecuteReader();<br />
<br />
if(dep.Rows.Count>0)<br />
{<br />
foreach (DataRow row in dep.Rows )<br />
{<br />
DropDownList2.Items.Add(new ListItem(row[0].ToString(),row[0].ToString()));<br />
}<br />
<br />
}



I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.

www.aktualiteti.com

AnswerRe: am tryin to fill the dropdwn list from the database...but it is not displayin any values..plz help me Pin
ShineHu24-Aug-09 23:14
ShineHu24-Aug-09 23:14 
QuestionLaunch Browser and pass parameters. Pin
Member 232448324-Aug-09 22:21
Member 232448324-Aug-09 22:21 
AnswerRe: Launch Browser and pass parameters. Pin
Vikram A Punathambekar24-Aug-09 22:29
Vikram A Punathambekar24-Aug-09 22:29 
GeneralRe: Launch Browser and pass parameters. Pin
Member 232448324-Aug-09 22:39
Member 232448324-Aug-09 22:39 
GeneralRe: Launch Browser and pass parameters. Pin
Vikram A Punathambekar25-Aug-09 6:05
Vikram A Punathambekar25-Aug-09 6:05 
QuestionMouse move and Opacity Changed problem... Pin
TAFIN24-Aug-09 22:19
TAFIN24-Aug-09 22:19 
Questionhow to pass parameters to an xsd dataset Pin
Jacobus0124-Aug-09 22:12
Jacobus0124-Aug-09 22:12 
Questionwave Format:Mpeg-Layer 3 Pin
javad_200524-Aug-09 21:59
javad_200524-Aug-09 21:59 
Questiondata table in dataset Pin
myinstincts24-Aug-09 21:54
myinstincts24-Aug-09 21:54 
AnswerRe: data table in dataset Pin
dan!sh 24-Aug-09 21:59
professional dan!sh 24-Aug-09 21:59 
GeneralRe: data table in dataset Pin
myinstincts24-Aug-09 22:19
myinstincts24-Aug-09 22:19 
Question[Message Deleted] Pin
darolia.manish24-Aug-09 21:47
darolia.manish24-Aug-09 21:47 
AnswerRe: C# Pin
SeMartens24-Aug-09 21:55
SeMartens24-Aug-09 21:55 
AnswerRe: C# Pin
musefan24-Aug-09 21:56
musefan24-Aug-09 21:56 
AnswerRe: C# Pin
Suresh Suthar24-Aug-09 22:15
professionalSuresh Suthar24-Aug-09 22:15 
AnswerRe: C# Pin
Vikram A Punathambekar24-Aug-09 22:33
Vikram A Punathambekar24-Aug-09 22:33 
QuestionProviding Shortcut key for winform - (Ctrl+S) Pin
Prakash N24-Aug-09 21:32
Prakash N24-Aug-09 21:32 

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.