|
this may return to your mail srever some mail servers don't accept unvalied users you should use a valied mail in from field
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
my application works like this,i have a datagrid,a dropdownlist and a submit button,my
dropdownlist contains a list of intervals eg(100-999)(2100-2199),in order for the user to
add to the grid he has to choose an interval from the dropdown,and the id for the row he's
adding has to be in that particular interval.
i have a method/function that checks if the id is in the chosen interval
private void checkvalue(int value)
{
if(value>=100 && value<=999)
{
}
else
{
label.text ="value is not in the required interval"
}...
and the button clickevent
private void ButtSubmit_Click(object sender, System.EventArgs e)
{
checkvalue(num);
//adding to the grid
collection.add(num);
...
}
when i click my submit button ,and into the checkvalue callfunction,if the value is not in the required interval ,it prints the text message but still continues to add the row to my grid
i want it to stop after it prints the message and exit without adding the row to my grid,what do
you suggest i do.i hope this is clear enough
thanks
|
|
|
|
|
|
I think you want your "checkvalue" method to return a boolean.
private bool CheckValue(int num)
{
return (value>=100 && Value<=999)
}
private void ButtSubmit_Click(object sender, System.EventArgs e)
{
if(CheckValue(num))
{
collection.Add(num);
}
else
{
label.Text ="value is not in the required interval"
}
}
|
|
|
|
|
I have seen a kind of navigation and i want to know the name of this. It was on the site "www.reinhard-mey.de".
Can anybody help us me? Give it the control also in c#?
|
|
|
|
|
Looks like a topic map displayed using a spring-layout.
I do not know working implementation in .NET for this.
Check Hypergraph and Touchgraph for Java...
If you find one - please notify me
/cadi
24 hours is not enough
|
|
|
|
|
That control uses macromedia flash. You can't do that with c#.
Dirk Watkins
|
|
|
|
|
Oh. I lied. That is java. But the same can be done with flash and it's probably a heck of a lot easier..
Dirk Watkins
|
|
|
|
|
how do i appendtext to richtextbox in bold?
bye
|
|
|
|
|
Use the Font dialog box to change the fonts, the font size, and/or the font style for text and data fields on your reports.
Access the Font dialog box through the Fonts tab of the Default Settings dialog box.
Font
Lists all the available fonts. Click a font name to select a different font.
Font style
Lists the available styles for the specified font. Click a font style to select a different style.
Size
Lists the available point sizes for the specified font. Click a size to change the size of the font.
Strikeout
Specifies whether the font should appear with strikeout marks.
Underline
Specifies whether the font should appear with underlines.
private void Fontmenu_Click(object sender, System.EventArgs e)
{
fontDialog1.ShowColor = true;
fontDialog1.Font = richTextBox1.Font;
fontDialog1.Color = richTextBox1.ForeColor;
if(fontDialog1.ShowDialog() != DialogResult.Cancel )
{
richTextBox1.Font = fontDialog1.Font ;
richTextBox1.ForeColor = fontDialog1.Color;
}
}
mahes
|
|
|
|
|
Hi
I am developing a website and my client require it to be "Multilingual".How can I do this.
Thanks in Advance
Alok
Alok
|
|
|
|
|
|
in oirder to do that you can use recourses file or the bettre way is to create an engine to translate any label in the page from a database
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
I've been working with my own custom events for controls and thought I had it figured out until I wanted to implement "Before" events(you know like BeforeExpand in TreeView).
This kind of event will have a "Cancel" or "Handled" flag to indicate to the sender that the event was canceled (or handled) by the subscriber to the event.
My question is, as the sender of the event, how do I know about the Canceling or handling?
I understand that the eventargs object will have a boolean value to indicate this but how does that information get back to the sender?
Thanks in advance,
Eric
|
|
|
|
|
|
Beringer wrote:
but how does that information get back to the sender
Because the event args are sent as a reference, so when control returns to your event handler the boolean value will be retained.
assuming the following FooEventArgs have a "CancelFoo" boolean property
private BeforeFooDelegate beforeFoo
private void onBeforeFoo(FooEventArgs e)
{
if(beforeFoo != null)
beforeFoo(this,e);
if(!e.CancelFoo)
this.Foo();
}
|
|
|
|
|
|
Cancel
Supported by the .NET Compact Framework.
Gets or sets a value indicating whether the event should be canceled.
// Calls this method from the InitializeComponent() method of your form
private void OtherInitialize() {
this.Closing += new CancelEventHandler(this.Form1_Cancel);
this.myDataIsSaved = new Boolean();
this.myDataIsSaved = true;
}
protected void Form1_Cancel (Object sender, CancelEventArgs e) {
if (!myDataIsSaved) {
e.Cancel = true;
MessageBox.Show("You must save first.");
}
else {
e.Cancel = false;
MessageBox.Show("Goodbye.");
}
}
mahes
|
|
|
|
|
|
hi there can someone help me out here... please tell me how to connect oracle as back end in C# & VB.net . i know how to connect MS Access and SQL server, but couldnt figure out this one.
failure can only inspire me...
|
|
|
|
|
|
|
Hi everyone
Is there a quicker and more efficient way of importing data programmatically from a table in database A into a table in database B using a C# windows application?
At the moment I open the connection to database A and read the data form the table into a dataReader object. Then I open the connection to database B, loop through the datareader and insert the data into the table in database B.
Thanks.
Kobus
|
|
|
|
|
Hi ,
Guess you can use DataSet Merge and Data Adapter's update functions to do this.
Thanks and Regards
Pani.
|
|
|
|
|
I have some questions on creating objects and classes.
1) When a member in the base class (class A) is declared as private (say "private int x"), will the instance of the derived class (class B) has a that private member? Is that an inherited class always inherits all members of the base class but cannot access the private members? (For example, in this case, class B also has "private int x", but cannot access "x" )?
2) When a method in the base class (class A) is overridden by the derived class (class B), is that the overridden version of the method be always called?
For example,
class A
{
public virtual void Test()
{
Console.WriteLine("This is A");
}
}
class B : A
{
public virtual void Test()
{
Console.WriteLine("This is B");
}
}
static void Main()
{
B b = new B(); A a = b;
b.Test();
a.Test();
}
The above code sample is copied from a book, but I am confused.....
I know the statement "b.Test()" will cause the output "This is B"
but how about "a.Test()", as a is referenced to the object of type B, which version of the method will be called?
What is meant by "A a = b"?
Again, thanks a lot for your help!!
Regards,
Tommy
|
|
|
|