|
Oops, that's my mistake
Just place ) at the end of the statement befre ;
Be an Eagle, Sky is Yours.
|
|
|
|
|
thnx but its still not working
|
|
|
|
|
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
string connection1 = ConfigurationManager.AppSettings["conn"];
OleDbConnection con1 = new OleDbConnection(connection1);
con1.Open();
OleDbDataReader dr;
string query = "select DISTINCT DEPARTMENT from TIME_DETAILS ";
OleDbDataAdapter da1 = new OleDbDataAdapter(query,con1);
DataSet ds1 = new DataSet();
//da1.Fill(ds1);
OleDbCommand cmd = new OleDbCommand(query,con1);
da1.SelectCommand=cmd;
da1.Fill(ds1,"dept");
DataTable dep=ds1.Tables["dept"];
dr = cmd.ExecuteReader();
DropDownList2.DataSource=dep;
if(dep.Rows.Count>0)
{
foreach (DataRow row in dep.Rows )
{DropDownList2.Items.Add(row[0].ToString());}
}
//while (dr.Read())
//{
//DropDownList2.Items.Add(dr[0].ToString());
//DropDownList2.DataValueField.Insert(dr[0]);
// DropDownList2.Items.Add(New ListItem(dr[0].ToString())));
// }
}
i tried dis too...but its also not helping....no values r shown in the drop down list.plz help me
|
|
|
|
|
Why you are writing code in SelectedIndexChanged event of the same control.
ankitjain1110 wrote: DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
Write this code on form's or another control's event.
Like on Form's Load event....
Be an Eagle, Sky is Yours.
|
|
|
|
|
I've plenty of Rectangles in an image and I want to grab events on each MouseEnter and MouseLeave. I tried with a bool for each rectangle and set it true when Cursor gets in and set false when gets out but that things buggy when Rectangles are overlapping...thats why I'm looking for another way. Any idea ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
probably you must use event mouseMove and check if mouse pointer is inside rectangles. overlapping should be no problem anymore.
|
|
|
|
|
how can you say overlapping wont be problem ? BTW I'm using WndProc and WM_MOUSEMOVE
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
.NET has a method/event for it. Put your image in a pictureBox and use event Paint and MouseMove.
I would avoid WndProc and Windows Messaging if .NET provide some method for it.
|
|
|
|
|
How can I access a reporting service from C#? I want to generate a PDF file that I can attach to an e-mail message.
_____________________________
...and justice for all
|
|
|
|
|
You can use web services provided by sql server reporting services.
|
|
|
|
|
Ok,
Any tip on how. I've searched for articles with code samples but have not found any.
_____________________________
...and justice for all
|
|
|
|
|
Hi everyone!
I have fixed sized form having ToolStripContainer that contains bottom and top ToolStripPanel.
I have 2 toolstrips and my contentpanel is designed when they were in single row. Now at runtime when I changed a toolstrip to another row of container my form contents get hidden behind the boundary of form.
This happens also when I change one of toolstrip to bottom ToolStripPanel as well. The bottom panel hides few buttons in ContentPanel.
How I can keep the visibility of my ContentPanel in these scenarios.
Thanks.
Good Day.
Hassan
|
|
|
|
|
System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.
Source Error:
Line 84: string cmd2 = "select Description from description_details where Group_id="+str_group +"";
Line 85: da1.SelectCommand = new OleDbCommand(cmd2, con1);
Line 86: da1.Fill(ds1,"group");
Line 87: DataTable dt1 = ds1.Tables["group"];
Line 88: descrptndpdnlt.DataSource = dt1;
Why is it showing error in line 86???
|
|
|
|
|
Actually your prob is here
myinstincts wrote: Line 84: string cmd2 = "select Description from description_details where Group_id="+str_group +"";
Single Quote is missing...
Replace this with following...
string cmd2 = "select Description from description_details where Group_id='"+str_group +"'";
Be an Eagle, Sky is Yours.
|
|
|
|
|
If Group_ID data type is numeric then build your sql query as:
Line 84: string cmd2 = "select Description from description_details where Group_id="+str_group;
If Group_ID data type is char (text type) then build your sql query(variable should be in single quotation) as:
Line 84: string cmd2 = "select Description from description_details where Group_id='"+str_group + "'";
Hope this will fix your problem.
-Ravi Kakumani
|
|
|
|
|
Hi everyone,
I run into a tricky issue when I run cmd.exe using Process class in C#.
1)Here's the C# code,it run the specified .bat file in command-line:
m_BasicDataProc = new Process();
m_BasicDataProc.StartInfo.FileName = "cmd.exe";
m_BasicDataProc.StartInfo.CreateNoWindow = false;
m_BasicDataProc.StartInfo.UseShellExecute = false;
m_BasicDataProc.StartInfo.RedirectStandardOutput = true;
m_BasicDataProc.StartInfo.RedirectStandardInput = true;
m_BasicDataProc.StartInfo.WorkingDirectory = Path.GetDirectoryName(batchFilePath);
m_BasicDataProc.Start();
string batchFileName = Path.GetFileName(batchFilePath);
string ipLine = batchFileName;StreamWriter inputStream = m_BasicDataProc.StandardInput;
inputStream.WriteLine(ipLine);
inputStream.Close();
m_BasicDataProc.WaitForExit();
m_BasicDataProc.EnableRaisingEvents = true;
2)In the .bat file,it calls a .vbs file with the content pretty much like this:
option explicit
dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim CreateFile
Set CreateFile = fso.CreateTextFile("InstallScripts\CreateTriggers.sql", true)
......
CreateFile.writeLine(strStatement)
CreateFile.WriteLine
set CreateFile = nothing
set fso = nothing
//
I found that the file CreateTriggers.sql was created successfully,it means that the work of this .bat file is finished,but it's really odd that the application is still blocked by the code line "m_BasicDataProc.WaitForExit();" and could not exit. Has anyone been in same situation?
Anything you could help would be appreciated!
|
|
|
|
|
the batch file finished but cmd.exe is still running - that's what m_BasicDataProc.WaitForExit() is waiting for. Try executing the batch file directly instead of passing it as an argument to cmd.exe.
|
|
|
|
|
Hi,
Suppose that we have a handle to an unmanaged control (window), is there any possible way that we "Cast" that handle to a managed control (for example ListView)?
Regards,
Beirami
P.S. Control.FromHandle() and NativeWindow.FromHandle() are returning null.
|
|
|
|
|
No, of course not. Because while the underlying handle is probably the same thing, it's not an instance of the managed class, so you can't cast it into one. You may be able to attach an instance of the managed class to an existing handle, but I don't know if methods exist to do that or not.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi All!!
I want to create exe file of Asp.Net C# web project so that i can deploy it on any computer. Please guide me how can i do that?and what will be the requirements to deploy it on other computer having no asp.net?
Please guide me!!
|
|
|
|
|
nudma wrote: want to create exe file of Asp.Net C# web project
no, you cannot create a exe file of asp.net C# web projects... only windows appliacations can be created as .exe or .msi files.
nudma wrote: what will be the requirements to deploy it on other computer having no asp.net
atleast .net framework is needed to deploy it on other computers...
|
|
|
|
|
Please read some basic books and please do not spam the forums with your questions. You are asking things that show you're at a level below beginner, you have no idea at all of what you're doing, or what the technologies you're using are for, or what they do.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
@ Christian Graus
Thankyou so much for your kind information...
|
|
|
|
|
Or you could at least try to work the google on the interweb.
Try This[^]
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hi,
I have a Windows Application that contains 3 Comboboxes that's being populated by a SQL database. Those 3 boxes are "Countries", "States" and "Suburbs". I want to code the Comboboxes so that when you select a country, the state combobox will display states for that country and when you select a state you should be able to select a suburb within the selected state.
How can I go about doing this?
Thank you!!
Illegal Operation
|
|
|
|