|
Yeah, I'm guessing that's XAML... Wheew! Thought that was real for a minute.
|
|
|
|
|
|
hi
plz give an example how to connect to sql server with password in vs2005 with sqldataadapter .. because i define an accound in security > login in sqlserver and set password but when i drag and drop sqldataadapter in vs2005 to my form and canfigure it i can not connect to sqlserver in local mode ( my server is : (local) ) plesae give me an example with full source code and database ..
i use sqlserver2000
thanks ..
|
|
|
|
|
SqlConnection connection = new SqlConnection("Server=(local);Database=database;User ID=username;Password=plaintextpassword;Trusted_Connection=False");
connection.Open();
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hi all
Have an poblem with System.Windows.Forms.ContextMenu class
Suppose i have some groups in this menu and want to divide ones with split bar.
Only one way how i can achived this is System.Windows.Forms.MenuItem.BarBreak = true; But this bar split my menu by vertical and i want by horizontal.
Haw i can implement this??
Thank.
|
|
|
|
|
See this example :
this.menuItem1.Text = "A";
this.menuItem2.Text = "-";
this.menuItem3.Text = "B";
Then you will see:
A
------
B
|
|
|
|
|
|
Hi,
i tested email sending with both web.mail mailmessage and CDO com object. With both i could send mails but only to a specific address (say ali@server.com) ... i cannot send to any other ID, but i dont get any exception, Send() is executed for other addresses too, but not being delivered. Anyone know why?
Ali
|
|
|
|
|
hi all,how to disable the listbox(asp.net listbox)in clien-side.ie:when i click the checkbox(checked)this listbox should be disabled and should be enabled when the checkbox is unchecked.
Regards,
ayyp
|
|
|
|
|
You can't disable a server control using client side script, as the server control only exist while the page is created on the server. You have to disable the html element that the server control created.
---
b { font-weight: normal; }
|
|
|
|
|
thanks 4 u r replay.one more prob insted of using asp.net listbox i use html listbox for the same purpose but i can't get this htmllistbox control in my codebehind even i chenge it as runat=server (i can get this control in my code behind when the number of listitems are small but in my list box i have nearly 200 items )how to solve this any other way to do solve my prob apart from this.....?
ayyp
|
|
|
|
|
ayyp wrote: thanks 4 u r replay
"Thanks, for you are replay"?
No, I am not replay.
ayyp wrote: but i can't get this htmllistbox control in my codebehind even i chenge it as runat=server
There is no reason why you shouldn't be able to access it, regardless of the number of items in it. What is the error message that you get?
---
b { font-weight: normal; }
|
|
|
|
|
Hi All,
Greetings.In one of my application i'm using 2 text boxes for displaying date and time respectively.i'm using the following code.
DateTime dat = DateTime.Now;
txtBookDate.Text = dat.Date.ToString();
txtBookTime.Text = dat.TimeOfDay.ToString();
But the DATE TEXT BOX displying the o/p as 07/12/2006 12:00:00 AM.But i need to display only the date.Can any one help me to correst it.I've tried with some keywords.So reply me ASAP.
Reagrds
Babu
Babu
|
|
|
|
|
Hi,
use
<br />
txtBookDate.Text = dat.Date.ToString("MM/dd/yyyy");<br />
to show date without the time component.
Regards
Sebastian
|
|
|
|
|
Or you can use:
txtBookDate.Text = dat.ToShortDateString() ;
|
|
|
|
|
Man try this ...............................................
DateTime dat = DateTime.Now;
txtBookDate.Text = dat.ToShortDateString();
txtBookTime.Text = dat.ToShortTimeString();
Do good and have good.
|
|
|
|
|
Hi,
I have an interesting problem (interesting for me ). I need to hide an event in an inherited class.
Example:
Base class: ComboBox
Inherited class: MyCombo
And I want the event SelectedIndexChanged to be "disabled" out of MyCombo class. So that it shloud be impossible to write:
MyCombo mc = new MyCombo();<br />
mc.SelectedIndexChanged += new EventHandler(mc_SelectedIndexChanged);
I tried this:
private new event EventHandler SelectedIndexChanged;
but it doesn't work - it is still possible to use this event.
Is there any way to do this? And is it correct to do it in OOP?
Thanx, Bobo
|
|
|
|
|
I havn't heard of a way to do this, maybe you could mark the event as Obsolete?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
You mean Obsolete attribute? I've tried it, but it didn't help
Thanx for your answer
Bobo
|
|
|
|
|
bobo.jede wrote: You mean Obsolete attribute?
Yes
bobo.jede wrote: I've tried it, but it didn't help
I know it won't but it informs other developers that you shouldn't use it. Maybe if you mark it with this and then in the event throw a NotImplementedException . The obsolete gives them the reason why they should not use it.
The only (and best way) to do this would be to write your own control (NB you don't have to write it from scratch you could create a wrapper around an existing ComboBox, only exposing the methods / events / properties you want).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Make your new event public and use ObsoleteAttribute with two parameters. In this case compiler will return an error when somebody try to use this event.
[Obsolete("SelectedIndexChanged is obsolete. Use MyNewEvent instead.", true)]
public new event EventHandler SelectedIndexChanged;
|
|
|
|
|
bobo.jede wrote: Is there any way to do this?
Yes, write your own control, rather than inheriting ComboBox.
bobo.jede wrote: And is it correct to do it in OOP?
Quite simply, no it is not. Inheritance implies that the derived object inherits every public property/method/event from its parent.
|
|
|
|
|
J4amieC wrote: Yes, write your own control, rather than inheriting ComboBox.
Yes, that can be a way but I want to use this control and it's rich functionality.
J4amieC wrote: Quite simply, no it is not. Inheritance implies that the derived object inherits every public property/method/event from its parent.
But I can do the same with methods, don't I ?!
Bobo
|
|
|
|
|
bobo.jede wrote: But I can do the same with methods, don't I
No, you can never completly hide a method in a derived class either. I suppose you could 'new' it and just do nothing within the method, but its still there.
|
|
|
|
|
Try overriding OnSelectedIndexChanged and DONT call the base class.
|
|
|
|