|
Any one can provide me any info?
|
|
|
|
|
Hello,
I'm writing application with very complex configuration (System.Configuration). I need to pass ConfigurationSection or ConfigurationElement inherited class object as a method argument, but method executes in separate AppDomain, since neither ConfigurationSection nor ConfigurationElement doesn't inherit from MarshalByRefObject classs I constantly get a SerializationException exception.
If I add SerializableAttribute to my configuration section it works, but I can't modify any variable.
What can I do ?
Thanks in advance.
|
|
|
|
|
Hi guys! is there anyone who knows how to retrieve photos from sharepoint 2007 using C#? Urgent, Thanks!!!
|
|
|
|
|
|
Use the System.Diagnostics namespace. It includes the Process object that lets you run external programs.
using System.Diagnostics;
...
...
Process p = new Process("notepad.exe");
p.Start();
It also includes methods such as WaitForExit() that tells your program to wait till the process it terminated, and also the 'StartInfo' that lets you set customized settings for running a program. Browse the namespace for more details.
|
|
|
|
|
|
|
can u tell me in brief
howw to use this
|
|
|
|
|
heyy thankss
btt its opening in different windows even after giving same parent as first arguemment
|
|
|
|
|
Hello Friends,
I am developing a windows application in which i have used a RichTextBox. I want that some data in RichTextBox comes in bold and some text in Regular size.
Please tell me how can i do that...
Thanks
|
|
|
|
|
You can use SelectionStart, SelectionLength and SelectionFont properties of RichTextBox class for that.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi D i x y.
Did you see this :
http://www.codeproject.com/KB/recipes/RtfConverter.aspx
The Freshman
|
|
|
|
|
Hi, I have a grid (4 rows x 5 columns). I need to sort grid by last column. But I want to trace what changes were made to row order. I need this info to:
1. Change row header's text 'cause it doesn't change automatically during sort.
2. Change the columns order, i.e. I have rows 1,2,3,4. After sorting I have 2,3,1,4. And I want my columns moved in that way: 2,3,1,4 (with DisplayedIndex property for example)
|
|
|
|
|
Hi,
Would anyone tell me how I can store HTML within XML ? Because, when I have < tag in XML, the XML gets screwed up. Also when attribute values have " character, XML gets error.
|
|
|
|
|
You just have to encode the text properly. Example:
<root>
<html>Some text with <abbr title="HyperText Markup Language">HTML</abbr> code in it.</html>
</root>
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks for the reply. I understood. but what about the situation when I had special characters like < in my html so when < is encoded to < and stored in xml, it will be mixed up with the < chars and when it is decoded, both encoded < and original < will be decoded to < character, right ? So, what is the effcient solution about this scenario ?
Thank you in advance.
|
|
|
|
|
When you encode html code with an entity like < in it, the & character is encoded as & , so the entity becomes &lt; .
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi all.
I have a XML file. something like this :
<FoxMark ELEMENTS="442">
<BOOKMARK1 ID="1" />
<BOOKMARK2 ID="2" />
<NODE4 ID="4" NAME="FireFox" DESC="" />
<BOOKMARK5 ID="5" />
<BOOKMARK6 ID="6" />
<BOOKMARK7 ID="7" />
<BOOKMARK8 ID="8" />
<BOOKMARK9 ID="9" />
<BOOKMARK10 ID="10" />
<BOOKMARK11 ID="11" />
<BOOKMARK12 ID="12" />
<BOOKMARK13 ID="13" />
</NODE4>
</FoxMark>
I want to read this file, line by line and LINQ.
Can you help me?
Freshman
|
|
|
|
|
You can use the File.ReadAllLines method to get the file into a string array, but I suppose that's not really what you want to do.
When you say that you want to read the file line by line, what do you mean really, and how does LINQ come into the picture?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thank you Guffa .
Guffa wrote: what do you mean really, and how does LINQ come into the picture?
OK, in my XML file there is a node in each line.
Now I want to read XML file node by node thus I thought that I must read XML file line by line.
Do you understand what I mean ?
Freshman
|
|
|
|
|
An XML file is not line based, so reading it line by line doesn't make sense. An XML file is just as valid if it looks like this:
<root>
<node>1</node>
<node>2</node>
</root>
or like this:
<root><node>1</node><node>2</node></root>
Use an XmlDocument object to read the file.
The DocumentElement property gives you the root node, from there you can navigate the tree structure using the FirstChild or ChildNodes properties. When you reach the node containing the nodes that you want, the ChildNodes property gives you a collection of all the nodes.
Another alternative to get the nodes from the XmlDocument is to use an xpath expression with the SelectNodes method.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
nice reply. Thank you my friend
The Freshman
|
|
|
|
|
M-Dayyan wrote: Can you help me?
Can. Won't. I suggst using an XmlDocument and the Load method, it simplifies things ever so much.
|
|
|
|
|
Yes, you have to use the System.Xml namespace. If you want to read it using SAX, you need to go for XmlTextReader which is faster in parsing and is good when reading large xml files.
|
|
|
|
|
How to doI know if the mail has beed sent succefully ,
How can I log that
SmtpClient smtp = new SmtpClient("127.0.0.1"); // We Just use the Local host
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; // This is to check the IIS
smtp.Send(email);
after this how to know if the mail has been sent successfull?
Please let me know
Happy Programming!
Regards,
ctrlnick !
|
|
|
|