|
hi every one
i have this problem
i have a webpage includes a text field i want to use the leave event on this text field for validating the data that i insert , my supervisore tell me that i have to use the JScript to do that ! any one can help me please ??
|
|
|
|
|
Your question would be better handled in the ASP.NET Forum. And he's right, you'll have to use JaveScript to subscribe to the event and do the validation. This would be entirely client-side script.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
You can use the AtuoPostback of your control and set the value to true. Then write your logic on Textchanged event. This one way and the other one is you can use custom validator control to check your own validation criteria.
If this not serving your purpose better post this on asp.net forum. cause i can't talk much anout asp.net.;)
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
i wanna a code example for (ExecuteOracleNonQuery)
i'm using oracle database with c#
|
|
|
|
|
An example is right in the documentation for the OracleCommand.ExecuteNonQuery . Read about the ExecuteNonQuery Method[^] in the .NET Framework SDK, which should also be installed on your machine (installed by default with Visual Studio .NET).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hi~
I use the treeview of framework problem and add a mouse down and up event handler, why the event not happen when I mouse click the treeview?
Thanks
|
|
|
|
|
I am setting properties for a series of labels on a form, for example:
this.lblIn10.Visible = false;
this.lblIn20.Visible = false;
this.lblIn30.Visible = false;
this.lblIn40.Visible = false;
this.lblIn50.Visible = false;
this.lblIn60.Visible = false;
this.lblIn70.Visible = false;
this.lblIn80.Visible = false;
this.lblIn90.Visible = false;
What I would like to do is something like this:
for(x=0; x < somevalue; x++)
{
string somestring = "lblIn" + x.ToString()
this.(somestring).Visible = false;
}
Obviously this won't work but is ther a way to cast the string to the object?
Thanks in advance,
Nick
handheld@canada.com
|
|
|
|
|
You could go through the control colection of the form and look at the names of the controls.
|
|
|
|
|
A Form has a Controls property which will give you a collection of controls known as a ControlCollection . Since a Label is derived from a Control you can simply iterate over each control, check to see if it is something in particular and cast it appropriately. Something like the following:
Label label = null;
System.Windows.Forms.Control.ControlCollection cc = this.Controls;
if(cc != null)
{
foreach(Control c in cc)
{
if(c is System.Windows.Forms.Label)
{
label = (Label)c;
label.Text = "Nick";
}
}
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
Nick,
Thanks for the response. It's a partial fix. I was hoping that there was a generic "cast a string to a control" type function.
This did help for this paticular problem.
Nick
|
|
|
|
|
Is there any way to use a Memory font in a PrivateFontCollection with a RichTextBox (or textbox for that matter). I can use memory fonts with other controls but for some reason if the font is not installed on the system then I can't use it with a textbox or richtextbox.
|
|
|
|
|
hey guys, well i wanna make a puzzle game,that the user can browse to a pic on his pc, and then it is cutted down into pieces and then the user recollect these pieces and put them 2gether. well i have an idea of what will i do,.. but i wanna help in the code
my idea is to divide down the drawing area into polygons,and number them randomly, then re arrange them by their number to give the sense of the pic being deformed.
the question is, what name spaces i have to use, and how can i draw polygons , is there a ready made methods?
would any one help plz?
|
|
|
|
|
|
In addition to what Nick said:
There's an excellent jigsaw puzzle available for UNIX called xjig. The source code can be found on the net, perhaps you can use it as a base for your program.
Regards,
mav
|
|
|
|
|
I have a UI contained in a .NET Windows Form. If someone clicks a certain button in the UI, I want the mouse cursor to change to a HAND. I know how to make that happen.
But if the user hovers the mouse over the other controls in the UI, I don't want it to change back to an arrow.
Must I set the Cursor property for EVERY control in my UI to a HAND cursor??? Seems like too much work. There must be a better way.
Anyone know the solution?
THANKS!
Mark
|
|
|
|
|
Why don't you set Form's Cursor property rather than of control.
this.Cursor = Cursors.WaitCursor;
This would keep the cursor as "BUSY" on all controls
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
How do I launch default e-mail client with a attachment already inserted? I want to use a open file dialog box to choose a pdf file, to use as an attachment, then open the default e-mail program with the attachment already inserted.
|
|
|
|
|
You can use the ProcessStartInfo and Process classes. The following code should get you started:
private void bClick(object sender, EventArgs e)
{
ProcessStartInfo pi = new ProcessStartInfo("mailto:you@here.com");
Process.Start(pi);
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanks for replying. I was able to open the default mail program with that code. I am still not able to insert a pdf as an attachment.
I am using crystal reports to generate a report. I then export the report as a pdf file and open the default mail program. I am stuck on how to insert the pdf file that I exported as an attachment file. Thanks for your help.
|
|
|
|
|
Hello All,
I'm attempting to create a C# Wrapper around a DLL from Diamond Systems. The problem I'm having is that the DLL is very dependant on Pointers.
I've suffered through must of it already, with a lot of help from these boards. However I've run into something I can't find an answer for: I need to pass a Struct containing a Pointer to a Function.
Here is the C++ Code:
typedef struct
{
DSCUserInterruptFunction func;
BYTE int_mode;
} DSCUSERINTFUNCTION;
typedef void (*DSCUserInterruptFunction) (void* parameter);
The DLL call is:
BYTE dscSetUserInterruptFunction(DSCB board, DSCUSERINTFUNCTION* dscuserintfunction);
Diamond Systems manual: http://docs.diamondsystems.com/dscud/manual_DSCUD_Function_Reference.html
If I can get this to run then the project is complete!
Thanks in advance for any help you can offer me.
If it is of any interest I just placed my order for next years MSDN subscription through Code Project, thus becomming a supporting member.
Thanks again.
-Marc
|
|
|
|
|
|
try this:
delegate void DSCUserInterruptFunction (IntPtr param);
struct DSCUSERINTFUNCTION
{
public DSCUserInterruptFunction func;
public byte mode;
}
[DllImport(diamond.dll)]
extern static byte dscSetUserInterruptFunction(DSCB board, ref DSCUSERINTFUNCTION dscuserintfunction);
static void DSCUserInterruptFunctionImpl(IntPtr param)
{
}
DSCUSERINTFUNCTION foo = new DSCUSERINTFUNCTION();
foo.func = new DSCUserInterruptFunction(DSCUserInterruptFunctionImpl);
byte result = dscSetUserInterruptFunction(board, ref foo);
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
Hey...
Is it possible to have a textbox in a context menu??
|
|
|
|
|
m_els wrote:
Is it possible to have a textbox in a context menu??
Yes, Access does something like this however you will need to write your own subclass of a MenuItem that handles the TextBox .
- Nick Parker My Blog | My Articles
|
|
|
|
|
thanks...but do you know any tutorials or something that describes this??
|
|
|
|