|
When you say associated with the class ChannelInformation what do you mean by that?
And why not just pass the StreamWriter by reference into Join when you call it?
|
|
|
|
|
if i have table with one col
salary
-------
5
9
7
i want to make comboBox for each record in the database
the probelm now how can make (onchange) even for each comboBox
and save direct to database ...
plz help
Palestine
|
|
|
|
|
I would do it something like this:
Have a foreach statement. Inside that foreach statement create a new combobox. Then add the item to the combobox. You would need to make a method that was generic enough so that you could use it for all of your comboboxes that you make. This method would handle your On Selected Index Change Event.
//thrown together, don't trust it to work without checking it over...
foreach(datarow dr in table[0].rows)
{
ComboBox cb = new ComboBox();
//Make sure you give cb a unique name so that you can tell it apart from the other combos.
cb.items.add("Pass in your value from the datarow here");
cb.WhateverThatChangeSelectedIndexEventIs += ThatEventITalkedAboutUpAbove();
//I'm sure you can manage to place the combobox on the form in a more exact way...
this.controls.add(cb);
}
Should be something like that.
|
|
|
|
|
I created a Forum web application
I have a DAL which implements the Table Data Gateway.
So basically I create the object, get the data, and then close it as fast as possible.
The problem I am facing is I create a new object every time.
I could easily make it static, but then I would face type-safe issues and introduce thread monitoring and what not. So I have elected to make it an instance.
Question: -----
How do I mark these DAL object instances as a pooled object and where or what do I add to the config file to control the specific settings for that pool?
Thanks,
Nick
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
What resources does the objects use that makes you want to pool them?
---
b { font-weight: normal; }
|
|
|
|
|
Ista wrote: How do I mark these DAL object instances as a pooled object and where or what do I add to the config file to control the specific settings for that pool?
If you are looking to pool the database connections, just make sure that the connection string is the same every time you open a connection. ADO.NET will take care of the rest.
If you're talking about pooling instances of your custom types, then it's not as simple. There is no out-of-the-box support for object pooling in .NET, but you can use COM+ (via System.EnterpriseServices) to enable object pooling. Check out this[^] section of the sdk for more info about that.
|
|
|
|
|
Friends,
I've a simple form and in its client area, i draw a circle in the OnPaint() method. I also placed few static controls on the form in such a manner that they appear inside the circle.
Now, i want to save this circular region of the client area as a bitmap file. Is it possible ? If yes, then how can i do so ?
Imtiaz
|
|
|
|
|
In the OnPaint, you're grabbing a Graphics object. That Graphics object is for the form. You can actually get a Graphics object on an Image object and paint to there. Then you can save that Image to a file.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Any idea how EncryptPassword uses machinekey to encrypt the password. As per my knowledge Membership uses RijndaelManaged to encrypt/decrypt the password. How it provids key and IV hash to RijndaelManaged?
What I need to do is following:
I have saved password using Membership provider(.NEt 2.0) have to access the same from other site which is running on .NET 1.1 and not having Membership.
Appreciate your help.
- ashish
|
|
|
|
|
how can split string with enter char ??
Palestine
|
|
|
|
|
Do you mean: string[] s = myString.Split("\n".ToCharArray());
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
help me please
i make project scan fingerprint for c# and using serial Port
i can not using NETSerial.dll .
lmjojopjkopkop
|
|
|
|
|
tanapop wrote: NETSerial.dll
What's this, even Google doesn't seem to find it. Have you tried the System.IO.Ports namespace?
As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it
|
|
|
|
|
This problem is annoying me as it seems so simple, but I can't find a simple solution to it.
From my main form, called Form1, a new form, Form2, can be opened using the following code
Form2 options = new Form2();
options.Show();
But how do I refer to variables from the main form, in the new form? I have decalred them as public within the main form but can't figure out how to refer to them. I can easily do the opposite, and refer to values from within the new form, using 'options.<variable>' in the main form. But using Form1.<variable> in the new form does not work.
Thanks for any help.
|
|
|
|
|
Take a look at this[^] excellent article.
|
|
|
|
|
hi all
I have 2 checkbox in my form .In Button1_Click (...) Event , I want to show another form by selection CheckBox :
if(CheckBox1.Checked)<br />
form1.ShowDialog();<br />
if(CheckBox2.Checked)<br />
form2.ShowDialog();<br />
if(CheckBox1.Checked && CheckBox2.Checked)<br />
form3.ShowDialog();
I want to show only form3 , if CheckBox1 and CheckBox2 is checked , But form1 and form2 are shown also .....
thanx a lot
Regards
-- modified at 11:31 Tuesday 8th August, 2006
s_mostafa_h
|
|
|
|
|
You need to reorder the if conditions so that the AND comes first and use elseif. In the present state, the first two conditions are also true and that's why form1 and form2 get shown.
if(CheckBox1.Checked && CheckBox2.Checked)
form3.ShowDialog();
else if (CheckBox1.Checked)
form1.ShowDialog();
else if (CheckBox2.Checked)
form2.ShowDialog();
This way, only if CheckBox1 and CheckBox2 are checked, form3 is shown.
|
|
|
|
|
thanks ,
s_mostafa_h
|
|
|
|
|
Hi,
How to get combobox in datagrid?
And how to have a search option so that datagrid will list only the searched items
Thanks & Regards,
Tojan.
|
|
|
|
|
Just a thought, but you might want to try the VB/VB.Net forum. They'll generally be able to answer your VB questions better than a C# forum will
|
|
|
|
|
Hi,
Is there any tool available for finding the LOC of .c & .h files
I need the LOC (# of Inserted, Deleted, and modified lines)after comparing two versions of files, something like comparing from clearcase.
Thanks & Regards,
Tojan John
|
|
|
|
|
Hey guys,
I understand PrintDialog is a functionnality dedicated to Windows Forms.
Do you know a similar functionnality for Web Forms? Or am I wrong and could I use it for Web Forms?
Thanks,
Oren.
|
|
|
|
|
Hi,
I have one problem I tryed to use method invoke to ...invoke some methods, in case I need to store by ref paramteter in object[] array, normally when I call MyFunction i set ref argument so it looks like that: MyFunction(ref MyObject) now I cant and if I set MyObject without ref argument it report me an error. Maybe someone has trayed to use tRfcInvoke in .NET SAP Connector to invoke RFC function with SAPTable as reference parameter or encounted this kind of problem in other projects?
Thanks in advance.
best regards,
Osin
|
|
|
|
|
Assuming you are using MethodBase.Invoke[^], the MSDN[^] documentation says that you don't need any special attributes for ref parameters.
"If the method or constructor represented by this instance takes a ref parameter (ByRef in Visual Basic), no special attribute is required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type."
|
|
|
|
|
hi, thx a lot it looks like it's intenral problem of sap connector function when I used MethodInfo from .net framework its work fine.
br,
Osin
|
|
|
|