|
Session.Keys contains all keys for the session variables.
Use Session.Remove to remove a specific session variable.
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi
Ok, I'm filling my dataset. Next I want to know the row number of value at columns[0] that equals to somthing like 1001 (primary key).
Sample : myTable( Id , Name , Phone )
0: 1000, mark , 687668
1: 1001, tom , 436536
2: 1002, jack , 564632
....
Now I want to get index (row number) of row in order to (Id=10001).
It should return 1.
Thank you.
-- modified at 9:03 Monday 21st August, 2006
|
|
|
|
|
Hello
Data rows don't have indexes stored in them. Yoiu will have to iterate thor DataTable.Rows one by one and get the index that you reach.
If you only want to get a reference to the row why not using DataTable.Select() method?
Regards
|
|
|
|
|
int count = 0;
foreach (DataRow dataRow in myTable)
{
if (dataRow["Name"] == "tom")
{
break;
}
++count;
}
count will return 1.
Very simple - took me so long to work out that the need for this indicates to me that it isn't the right way to go about coding but no one can tell me why?
-- modified at 15:59 Monday 21st August, 2006
Glen Harvy
|
|
|
|
|
Hi,
I just have a query on this attribute, using .NET 2.0.
I have a BasePage class, which resides in the MyWebsite.Framework.BaseClasses namespace.
How do I specify this in the <pages> element, I'm not sure what the assembly is??
And how would the code behind page look like for an aspx page that uses this BasePage class?
Usually I would "import" this namespace and have that page extend from it, like so:
public partial class UpdateOrderItems : BasePage
{
}
I hope someone can help.
Regards
ma se
|
|
|
|
|
Hi,
I written a form application which is needed to activate when it receives a event from a hook procedure. the hook procedure sends the WM_COPYDATA message to my forms app. When I receive this message from hook I want my form app to be activated and shown to window. In the event handler of the message I tried to set the visible property of form to true, but it didn't work. Also Focus returns false.
How can I cahive this activating of application upon receiving the event?
Regards,
Hemant Kulkarni
|
|
|
|
|
How about:
WindowState = FormWindowState.Normal;
or
WindowState = FormWindowState.Maximized;
|
|
|
|
|
hi,
I tried this, but the form is not shown as active application, so this normal or maximized state doesn't affect
Thanks and Reagrd
Hemant.
|
|
|
|
|
Form.BringToFront() ?
"One of the Georges," said Psmith, "I forget which, once said that a
certain number of hours' sleep a day--I cannot recall for the moment how
many--made a man something, which for the time being has slipped my
memory."
|
|
|
|
|
Hi,
This doesn't work, it just shows the icon on task bar blinking
Thanks & Regards,
Hemant
|
|
|
|
|
Hello
Hemant kulkarni wrote: I written a form application which is needed to activate when it receives a event
How did you Deactivate your form?? Reverse it!
Regards
|
|
|
|
|
Hi,
I minimized it by clicking the minimize box, but now I want it to be activated when user presses f12 key which I handle in a Windows hook
Thanks & Regards
Hemant.
|
|
|
|
|
Hello
If that's it then just like stancrm told you WindowState = FormWindowState.Normal should work! If not, try to add Activate() after it.
Hemant kulkarni wrote: when user presses f12 key which I handle in a Windows hook
I thought WinXP doesn't allow anybody to hook the F12??!! Strange!
Regards
|
|
|
|
|
Currently I am stacked from what Im doing. My problem is that I have a tabControl and inside the first tab, I want to have two divisions the left division (for menus) which comprises of buttons like button1 button2. Then on the rigth division displays the respective content for the button1 and button2.
For example, button1 when clicked, it will display a datagrid of a table. Then on the button2 once clicked displays a text box and a button etc...
Is this possible? What I want is to design those things at design time. Then I just called it. Is this possible?
If you could create me a simple prj like this or point me to a certain tutorial that is same as my scenario that will be great.
Please help, bec I cant start at all.
|
|
|
|
|
Hello
It's not just posiible, it's also easy with several ways.
1- Create you Menustrip, dock it to the left, make the text of each button vertical.
2- Make all your controls and put them in small sizes on the tabpage, you'll resize them later.
3- Set all controls Visible = false
3- Now, if it will be only one control at a time, handle the click event of each menu button, and on each button make all controls Visible = false, and Dock = None, except the one you want to show => Visible = true, and Dock = fill;
4- If it will be more than one control, put them all in a panel, or a group box, and handle the group box or panel just as in step 3.
5- Don't forget to initialize your tabpage with the first control you wish to view
This was just one way. Improvise!!
Regards
|
|
|
|
|
Hi,
I need to create form like ICQ/
Thank u
|
|
|
|
|
What do you mean excactly with 'like ICQ'?
Maybe you can use the msn API, or skype beta API? I don't really know if ICQ has an API too, maybe it has? Try a search on google...
Succes
|
|
|
|
|
i mean a form that wouldn't be hidden by another form and the other windows will be affected by this form (the form will be showd always even if other window are open)
|
|
|
|
|
Hello
You will have to use windows API to do this. The function is
::SetWindowPos(m_hWnd ,
HWND_TOPMOST,
rect.left,
rect.top,
rect.Width(),
rect.Height(),
SWP_SHOWWINDOW
search for how to handle unmanaged calls from C#, and dllImport.
Regards
|
|
|
|
|
Dear Respected Programmers
I need Simple Samples of Send and Receive Email.
thank you
|
|
|
|
|
But not enough to try google ? The web abounds with samples for this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello
All you need is in System.Net.Mail namespace. Check MSDN for samples, or search the C# network articles here in CP.
Regards
|
|
|
|
|
Dear Respected Programmers
Kindly help me and give me solutions about :-
whenever I insert the date value into table
"Example VAlue 01/08/2006" it goes to with this format => 08/01/2006. Please help me.
Thank you very much in advance
|
|
|
|
|
Hello
The problem is in your culture. What culture do you use in your program - if any-, and what culture is installed on the machine?
DD/MM/YYYY can be transfered by error to -> MM/DD/YYYY
Regards
|
|
|
|