|
It is a good notice from you
But i didn't know that the forum cut that out.
Why don't u try to help that poor guy instead of loosing your time on unrelavent comments
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">Saira Tanwir wrote:</div>plz reply quickly </blockquote>
This really bugs me. You're getting help for free, people will reply when they reply. No-one is 'on duty'
int count=4;
int[] indice = new int[count];
MessageBox.Show(count.ToString());
for(int i=0;i<count;i++)
indice[i] = TableListBox.CheckedIndices[i];<--Exception
return indice;
you need to check 'Ignore HTML tags in this message (good for code snippets) to post code with < in it. As I did.
Now, the issue is plainly that you don't have four checked indices. Why do you need to do this at all, why not just return the collection, or convert it to an array directly ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
well guys
the problem is still there
But thanks anyway for all thee help and ur precious time
regards
Saira
|
|
|
|
|
Well, it's a really simple one. You need to step through the code and see what's happening, if you need to do that, to be convinced that hard coding the number 4 when the list could have less items is a bad idea. You'll see that it blows up because there are not four items checked. Nothing else makes sense.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi folks,
I want to run a exe file from the windows service using c# in .Net 2.0. Now i have using the System.Diagnostis.Process to run that exe file but it wont run and it throw the error "Service process can not be added with service controller". how can i solve this problem .
My code is here,
ProcessStartInfo Pinfo = new ProcessStartInfo(System.Windows.Forms.Application.ExecutablePath.Replace("PSIS.EXE","ndatagen.exe"),TranId + " " + Properties.settings.Default.PmsPath);<br />
Pinfo.CreateNoWindow = true; <br />
Process Pros = new Process();<br />
Pros.StartInfo = Pinfo;<br />
Pros.Start();<br />
Pros.WaitForExit();
|
|
|
|
|
Hi,
First things first, please don't mind for posting this
here. This is very urgent, and the hardware forum is
really slow, so I had no choice. Apologies in advance.
I'm planning to build a high-end PC within a decent budget.
(At least I hope to)
I want to know whether the single core Intel 3.2 GHz CPU
or the dual core Athlon 3600+ will offer better performance?
(Let's say I have to choose between these two).
Also, is the single core 3.2 GHz Intel CPU 64 bit? I know the
Athlon 3600+ dual core is 64bit. Does having 64bit mean better
performance?
I plan to run very cpu intensive applications like Audio Workstations
and 3d Graphics software.
Basically, this is going to be a multimedia production and video
editing system.
Also, please tell me to what extent can the motherboard affect
the performance. Is is really a performance factor? Or will a
decent motherboard do?
Please let me know quickly as I have to make the decision within
a few hours.
Thanks.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
hi,
can tell me how can i write code for windows authentification in c#.net 1.1 to connect the remote computer and getting the database back up from sql server 2000.
this is haneef
|
|
|
|
|
heres the connection string i use for creating SQl Server connection
ConnectionString="uid='sa'; pwd='sasa';"
+"Initial Catalog=;"
+"Data Source=.;";
if u want it with windows authentication onlythen use this
ConnectionString="Integrated Security=SSPI;"
+"Initial Catalog=;"
+"Data Source=.;";
where Initial Catalog is the name of the Databaseu want to connect to and DataSource is the name of the server u want to connect to. if u are working in a standalone environment having ur own PC as the server then use "." for data source.
hope this helps
Saira
|
|
|
|
|
how to change the vs 2005 projects into to vs 2003 in c# .net 1.1
The VS 2003 editor does n't allowing VS 2005 projects how can i open and use it
shaik haneef
|
|
|
|
|
|
You can not jump back. For that you will have to remove all .NET 2.0 features from current project and then ad those files in VS 2003 project. But why do you want to do that?
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
|
I have a combo box whose items are load from a List (List is not empty). I already set SelectedIndex = 0 to choose the first item in code. But at runtime, when I click the arrow, drop down list appear and I don't select any item, SelectedIndex will be set to -1. If I select an item, SelectedIndex will be other than -1.
I think SelectedIndex should be 0 even I click the arrow and don't select any item. Is there any body has same problem?
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
It's a bug.
I have a list contains several items of Tag(int id, string name). I use "id" as ValueMember and "name" as DisplayMember. If the first item has name is an empty string, the problem will appear.
When you click the arrow, seems M$ implemented to select text value to get the index. If you have an empty string, it cannot select anything and the returned index will be -1.
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
Is it possible to write code to make compile-time decisions about which code to include, depending on attributes (or the presence of) generic parameters of the class?
For example:
<br />
class HashTable<TKey,optional TValue><br />
{<br />
...<br />
struct Slot {<br />
public TKey Key;<br />
#if present(TValue)<br />
public TValue Value;<br />
#endif<br />
}<br />
}<br />
When TValue is present, the hash table would behave like a normal hash table; when TValue is not present, the hash table would behave like a set. The difference between a set and a hash table is very minor and it would be error-prone and inelegant to have to duplicate the entire class to get both a set and hash table from code that, with very little modification, could support both.
Something like this might be feasible too (the semantics here with SpecialTValue are problematic; this example is just to illustrate the idea):
<br />
class HTBase<TKey,TValue><br />
{<br />
...<br />
struct Slot {<br />
public TKey Key;<br />
#if (TValue is SpecialTValue)<br />
public TValue Value;<br />
#endif<br />
}<br />
}<br />
<br />
class HashTable<TKey,TValue> : HTBase<TKey,TValue><br />
<br />
class Set<TKey> : HTBase<TKey,SpecialTValue><br />
|
|
|
|
|
Hello,
I'm hoping someone can help me figure out how to save a dataset to a text file. When the user hits the "save" button it should bring up the "save as" window.
Thanks
|
|
|
|
|
Use XmlSerializer.
using (FileStream fStream = new FileStream("test.xml", FileMode.Create))
{
XmlSerializer s = new XmlSerializer(typeof(DataSet));
s.Serialize(fStream, dataSet);
}
|
|
|
|
|
You can convert the DataSet to XML and then save the XML file to the web browser by setting Response.ContentType appropriately.
|
|
|
|
|
|
I need some help guys. Rest assured I have done some research before posting here. Thanks in advance!
I have a form where I added a datagrid control. Then I dragged a stored procedure in one of my connections to the form. This created a SqlConnection and SqlDataAdapter objects below the form. I then created a DataSet using the Generate Dataset wizard. Once the dataset is created, I associated the datasource of the datagrid control to the dataset's stored procedure. Everything seems fine as I can see the columns of the stored procedure appeared as headers in the datagrid.
Next, I initialized the stored procedures parameter by going to the SqlDataAdapter's SelectCommand property. I clicked the ellipses from Parameters and in SqlParameter Collection Editor, I went to initialize each of the parameter's value.
Finally, under the InitializeComponent() of the constructor, I put the following 2 lines to initialize the datagrid with the dataset of the stored procedure:
sqlConnection1.Open();<br />
sqlDataAdapter1.Fill(dataSet11.dbo_spMyStoredProc);
I then run my little application but then gets a runtime exception that I cannot debug due to
Registered JIT debugger is not available.
My questions are as follows:
1. Without having to debug first as there seems to be a problem with the JIT debugger, what could I have missed/done wrong that results in the runtime exception?
2. Is this the best way to running a stored procedure (with parameters) and displaying its result set in a datagrid control?
3. How do I fix the JIT debugger unavailable so I can debug my CSharp codes? It seems to be caused by corrupted VStudio so is reinstalling the only way to fix this?
Again, thank you very much. Hope to hear from you soon as my deadline is approaching.
cheers!
j11Sotware
|
|
|
|
|
oh.. My dear friend .You can search it in internet.
I think It's must exist in this site .
My MSN:hz_luyg@hotmail.com
luyuguo
|
|
|
|
|
Dear All,
I am developing web Application using asp.net and C#(VS2005).i want to know how i can fetch menu item selected(which is desinged in master.aspx) on the other C# page (welcome.aspx.cs).
regards
imran khan
|
|
|
|
|
You can manage via clientside JavaScript right?
|
|
|
|
|
hi
i have a treeview control in one form which has some nodes and i need to display them as a list in some other form's combobox control and these two forms belonging to the same project i created an instance of form1 in form2 but its not showing the controls associated with form1 with my instance object.
please suggest how to get the data of form1 into form2
thanks in advance.
|
|
|
|
|
Is it a Web Application or Windows Application?
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|