|
if(treeview1.SelectedNode != null)
{
if(treeview1.SelectedNode.Text == "ParentNodeName")
{
}
}
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu
|
|
|
|
|
Thanxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
|
|
Hi,
Really thanks for your reply.But i could not open the link which you provided.
Could you please suggest any other link?
Thanks
Regards
Anu
|
|
|
|
|
http://regularexpression.com/
|
|
|
|
|
Load the url in a webbrowser control, then use the Document property and then the Links property
|
|
|
|
|
You have forgotten the colon in some of the (?: parantheses.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
I have generated a .cs file from my .xsd file using the command line program XSD.
The xml file contains many nested tables, so several of the generated classes have columns with autoincrement=true.
If I add a new child row then I would expect the autoincrement column to be set to a value after I add it. Unfortunately, it remains at DBNull.
This means it becomes a root level item rather than the child it should be.
Any ideas?
|
|
|
|
|
Please confirm that you have provided values for AutoIncrementSeed and AutoIncrementSteps
Regards,
Ritesh Mehrotra
Software Engineer
|
|
|
|
|
I create a simple form with a toolstrip and attach a ToolStripProgressBar to it.
I want my progress bar to align from right to left, so I set the RightToLeft propery of the toolstrip to "NO", and set the Alignment property of progress bar to "RIGHT". But it doesn't work.
And for whatever I change these properties, my progress bar is always align to the left.
Can you help me with that?
Thx alot.
|
|
|
|
|
Hi All
I am saving image files on web server. To secure them i want to encrypt them. How can i achieve this? Please give me some solution/suggestion to solve the problem.
Regards
|
|
|
|
|
Zee Ahmed wrote: How to encrypt an image file ?
The same way you would encrypt anything else. There is nothing special about encrypting image files. A simple search of the internet with ".NET Encryption" will turn up many useful resources.
|
|
|
|
|
Hi, I have a question that I would like for someone to help me with. Because of resource restrictions, I tend to steer away from using try/catch blocks if it is possible.
I just want to know if there is a way of testing whether a connection will open using if statements (maybe using the conn.State/ConnectionState properties) or other methods.
Any suggestions?
|
|
|
|
|
That's really bad practice avoiding try/catch/finally, how do you close an open connection if your code exceptions and you don't have a finally block?
|
|
|
|
|
Using if statements you can pretty much avoid the entire try/catch thing in general. I realize there are certain things that have to be try/catched but most people don't realize how resource intensive try catches can be.
|
|
|
|
|
TheKrazyNomaD wrote: I realize there are certain things that have to be try/catched but most people don't realize how resource intensive try catches can be.
Only if an exception is thrown. They cost nothing if it isn't. Do you expect that the connection will fail sufficiently often that it isn't an exceptional situation but a normal situation?
|
|
|
|
|
TheKrazyNomaD wrote: I just want to know if there is a way of testing whether a connection will open using if statements (maybe using the conn.State/ConnectionState properties) or other methods.
There is no guarantee that it will actually open when requested, even if you are able to check beforehand. In the tiny fraction of a second between your test and actually attempting to open a connection a number of things could happen - such as network failure, the SQL Server being shutdown, the server being rebooted, power failure somewhere between you and the server, etc.
You are better using try/catch/finally to ensure that the connection is actually opened and responding appropriately if it doesn't.
|
|
|
|
|
I agree with Colin. To be honest, you are better off with the couple of extra clock cycles for your try/catch/finally block than you would be if you application falls over in a heap because the time between testing the server connection to the time you open/use the connection, the network goes down/server unplugged from the network, etc.
Do you use the using statement in code? If so, you are using try/finally, e.g.
using (SqlConnection connection = new SqlConnection())
{
...
}
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I have an XML with non-english characters in the property name. My XML is something like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<file>
<city name="New York">
<population>10,000,000</population>
</city>
</file>
Now, instead of "New York", I have "ניו יורק", which is NY in Hebrew. Unfortunately, I cannot change this, and the problem is that the code won't recognize it. The code:
XmlDocument doc = new XmlDocument();
doc.Load("C:\pop.xml");
XmlNode xml = doc.DocumentElement;
string pop = xml.SelectSingleNode("/file/city[@name='" + cityName + "']/pop").InnerText;
Where cityName is New York in Hebrew. I tried changing the NY in all places to English - and the code worked, so I guess it's the Hebrew that is doing the problem.
Any idea how I can resolve this?
Thanks,
Yoni
|
|
|
|
|
Fix the encoding attribute in the <?xml?> tag so it matches the actual encoding of the XML.
|
|
|
|
|
Thanks. For some reason, the ISO-8859-1 wasn't enough, so I changed it to ISO-8859-8.
Yoni
|
|
|
|
|
Use UTF-8 (default of XML). Everything but Unicode (the encodings UTF8, UTF16, or UTF32) is depricated and only supported to allow loading data from legacy programs.
|
|
|
|
|
hi all
i need an implementation of an association rule mining algorithm. (no matter which algorithm)
thanks
|
|
|
|
|
Will this help?
http://www.vldb.org/conf/1995/P432.PDF[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|