|
in my project i nedd the first root node invisible, my solution was stablishing margin-top:-30px, i tried finding on javascript but it didn't caught the css style neither the element.style.display="none" neither the element.style.visibility="hidden"
good luck
|
|
|
|
|
Hello,
I have a table with the primary key being a auto incremented value (IDNumber).
I need to retrieve the latest value that was inserted into the database.
So if the latest IDNumber is 100, I have to somehow pull this number from the database, so I can use it in my program.
The main problem is, if the program is first started I need to get this value.
I am using VS 2005 and SQL server 2005.
Is there a simple way to do this.
Thanks in advance,
Steve
|
|
|
|
|
fire a query which would fetch max of ur primary key column.
e.g.
Select Column1,Column2 FROM Table WHERE PrimaryKey = SELECT MAX(PrimaryKey) FROM Table
sameer
|
|
|
|
|
use IDENT_CURRENT( 'table_name' ) to get the last identity value generated for a specified table or view in any session and any scope.
Naveen G
MCSD.Net
|
|
|
|
|
Hi all,
I need to solve a problem for working with file in C#. I had a text file. It stores information of Customer. It is viewed:
Customer.txt
ID Name Address PhoneNO
1 Johnny Texax 1234567
2 Jackson NewYork 4562314
3 Bush LalsVG 4789633
4 Michael Maiami 7550751
.......................
Now, I want to add new Custmer into Customer.txt. But this Customer's ID is not the same Customer's ID exists in file. (the same ID in a table in database ).
Please help me!
Thanks!
|
|
|
|
|
You can read the text file as line by line and use the substring to spilt out ID from the string. use the following
<br />
File.ReadAllLines Method <br />
string[] s=String.Split (' ')<br />
then Compare every 3rd element in the array (s) ( C.ID) to check whether the CID is existing in the file or not.
Note : space delimit is important between the columns in the file
|
|
|
|
|
use xml file to store and retrieve value.it's a Good Practice to use xml file for structure data
sameer
|
|
|
|
|
If XML is not an option, you should have some kind of delimiter that distinguishes the fields. Then split the fields by the delimiter.
|
|
|
|
|
I was looking at the article written by Ian Giffen that he had written about the DragDrop event handler at http://www.codeproject.com/cs/miscctrl/LANDragDrop.asp[^ and I have developed a quite interesting challenge regarding how the application functions.
I am requesting that a DragDrop expert to download the source code application and to make the following modifications to the source code in order to reach the dilemma that I have encountered.
Make the following changes to the source code in the Form1 form.
Add a second control to the application like so:
public Form1()
InitializeComponent();
TestControl NewCtrl = new TestControl();
NewCtrl.Left = 50;
NewCtrl.Top = 50;
TestControl NewCtrl2 = new TestControl();
NewCtrl2.Left = 150;
NewCtrl2.Top = 50;
this.Controls.Add(NewCtrl);
this.Controls.Add(NewCtrl2);
DragDropHandler.Initialize();
DragDropHandler.RegisterControl(this, true, true);
DragDropHandler.RegisterControl(panel1, true, true);
DragDropHandler.RegisterControl(NewCtrl, false, false);
DragDropHandler.RegisterControl(NewCtrl2, false, false);
DragDropHandler.RegisterControl(button1, false, true);
}
Then in the TestControl.cs file make the following changes:
public TestControl()
{
InitializeComponent();
this.Width = 50;
this.Height = 50;
}
to make each control bigger. Now here is the dilemma. I would like each of the two controls: NewCtrl and NewCtrl2 to be able to act as parents to each other. That is, I would like to be able to drop one of the controls onto the other.
I have attempted to change the following code:
DragDropHandler.RegisterControl(NewCtrl, false, false);
DragDropHandler.RegisterControl(NewCtrl2, false, false);
to...
DragDropHandler.RegisterControl(NewCtrl, true, true);
DragDropHandler.RegisterControl(NewCtrl2, true, true);
and I have tried to catch the control in the DragOver event, but to no avail. The DragDrop event handler needs to have access to the parent control if one of the controls has been dropped onto the other control. This is the challenge. I am requesting the assistance of a DragDrop guru to resolve this dilemma. Please help!!!
|
|
|
|
|
How do you clear the write-protection on folders? I need to get a file from the IE cache to modify it. Thanks for any help.
-Fred Morstatter
|
|
|
|
|
Why would you want to change a file in cache? Why not just change the file on the web server? The next time your site is visited, the cache will be changed.
|
|
|
|
|
I wrote a custom menu control that accepts keyboard movement.
I have a form with a button on it.
When I click the button I see my menu pop up below the button.
The problem is that the focus shifts between the button and the custom control whenever I press an arrow key.
How do I keep other controls from stealing focus away from my custom control.
I don't want to disable other controls.
I want to maintain focus in my custom control
I've tried to set the handled and the suppressKeyPress functionality in the event but the button still grabs focus for every other keypress.
Any ideas?
Thanks,
Brad
|
|
|
|
|
I found it... here is the magic override...
protected override bool IsInputKey(Keys key)
{
switch (key)
{
case Keys.Up:
case Keys.Down:
case Keys.Right:
case Keys.Left:
return true;
}
return base.IsInputKey(key);
}
|
|
|
|
|
hello,
how can I use AdjustTokenPrivileges en C# ?
thanks
Vincent
|
|
|
|
|
I find this : it is ok and run correctly
public struct TOKEN_PRIVILEGES
{
public LUID Luid;
public int Attributes;
public int PrivilegeCount;
}
//Ajustement du token privilege
[DllImport("advapi32.dll", CharSet = CharSet.Auto)]
public static extern int AdjustTokenPrivileges(int tokenhandle, int disableprivs,
[MarshalAs(UnmanagedType.Struct)]ref TOKEN_PRIVILEGES Newstate, int bufferlength,
int PreivousState, int Returnlength);
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
public struct LUID
{
public int LowPart;
public int HighPart;
}
[StructLayout(LayoutKind.Sequential)]
public struct TOKEN_PRIVILEGES
{
public LUID Luid;
public int Attributes;
public int PrivilegeCount;
}
|
|
|
|
|
Hi all
How can i access a specified field's value in a crystal report by code
eg : like how can i increment a value of a specified field in a crystal report by code (in an event(Button_click))
thanks
SalehMahmoud
|
|
|
|
|
One listing is enough. We're not blind.
|
|
|
|
|
|
Hi all
How can i access a specified field's value in a crystal report by code
eg : like how can i increment a value of a specified field in a crystal report by code (in an event(Button_click))
thanks
SalehMahmoud
|
|
|
|
|
Hi!
I have handheld laser barcode scannr (Metrologic MS951). It is connect to COM1 (it works becouse I have test it by MetroSet program .
Whot do I have to do to get reach of (read) this barcode number which the scaner will read?
Thanks.
|
|
|
|
|
Try to read some barcode using Hyperterminal from Windows. Just set the port to COM1 and set some parameter like Baudrate, etc... If it works, then you can use class SerialPort in C# to read from COM Port.
|
|
|
|
|
Hi all
How can i access a specified field's value in a crystal report by code
eg : like how can i increment a value of a specified field in a crystal report by code (in an event(Button_click))
thanks
SalehMahmoud
|
|
|
|
|
Hi all
How can i access a specified field's value in a crystal report by code
eg : like how can i increment a value of a specified field in a crystal report by code (in an event(Button_click))
thanks
SalehMahmoud
|
|
|
|
|
I'm learning how to program C#, but I'm having very little luck. Everytime I search around I can never find the right code snippets to help my program.
What i'm trying to do is take "A"
and add 3 (+3)
and come up with "D" "D"
So I'm pretty much trying to take characters convert to numbers and add the binary value and then convert back to characters.
A +3 = D
Unicode
Anyhelp would be greatly appreciated, If not, I'll keep looking and post up a solution if I can find one.....
|
|
|
|