|
Hi,
I have already done all the namespace mechanisms known to me.The problem is , if i add a namespace on my own, it should be applicable to all parts in the xpaths, not just the last couple of parts. I think, we need to find a way to specify that "soap" prefix is not a namespace and it is just an element name. Any way thanks for your reply
Regards,
James
|
|
|
|
|
I'm a current MCAD student. Hope someone can help me with a small query. I am working on an application that saves student records to an xml file. Through using an Xml Schema, a dataset generated from the xml schema, a new student row and the WriteXml method, I can save a new record to an xml file.
However, if I display an existing record to a series of textboxes and want to amend the record, how do I save the amended record back to the xml file. If I find a student row using the Student ID, populate the textboxes with the details, then use WriteXml method again, that saves a new record to the file instead of amending the existing records. I therefore conclude this is the wrong way of doing things so I am asking if anyone can point me in the right direction.
Is there another dataset method I should be using that I am not aware of to update an existing record. The NewStudentRow() method adds a new record, is there another method for updating?
Grateful for any help.
|
|
|
|
|
İs there any method taht convert all items in a string array to an int array
String[] --> int[] ???
karanba
|
|
|
|
|
try to convert string array items to integer and add it to int array one by one
int[0]=int.Parse(String[0]);
.
.
.
.
rahul
|
|
|
|
|
Check out the Array.ConvertAll<> method.
---
b { font-weight: normal; }
|
|
|
|
|
thank array.convert.all work fine for me
karanba
|
|
|
|
|
Hi,
When a network cable is plugged or unplugged from Lan card windows displays a message "LAN is now connected" or "Network cable is unplugged" in system tray. My question is how can i build an application which display such messages when a cable is unplugged from network card.
Thanx in advance.
Regards
Aamer
|
|
|
|
|
|
Hi,
I want to create a process using a user's login info. In managed C++ there is a "CreateProcessWithLogonW" function but I want to accomplish my task with managed code.
Is there any equavalent method for "CreateProcessWithLogonW"? How can I start a process using a logon info?
thanks,
- ferudun
|
|
|
|
|
Use an overload of Process.Start that takes an instance of ProcessStartInfo class which provides properties for logon information.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks for your reply but it is not clear to me which attributes of ProcessStarInfo has to be supplied with user's login name and password.
Simply, I need running a program with another user's privileges. When I use "runas" DOS command I am prompted to enter the user's password. That's the problem. I don't want to supply the password during runtime. I want the job to be done automatically.
thanks,
|
|
|
|
|
The properties are called UserName and Password . I saw right now that both are new in framework version 2.0 so that's probably the reason why you didn't find them. In case you're using a framework version prior 2.0, there's probably no managed way and you have to p/invoke the unmanaged function mentioned in your first post.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
thanks,
i am using 1.1
|
|
|
|
|
In case you don't already knew it, take a look at http://www.pinvoke.net[^]. It's a great help when you have to work with unmanaged apis.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi all,
I want to check whether computer is connected to the network or not. I use a boolean method IsNetworkConnected() as shown below. I wonder if this method is OK, if not can you suggest any method?
public bool IsNetworkConnected()<br />
{<br />
IPAddress IPAd;<br />
ipHostInfo = Dns.GetHostEntry(Dns.GetHostName());<br />
IPAd = ipHostInfo.AddressList[0];<br />
<br />
if (IPAd.ToString() == "127.0.0.1")<br />
{<br />
return false;<br />
}<br />
else<br />
{<br />
return true;<br />
}<br />
}<br />
|
|
|
|
|
i am sure this method will work.
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
It really depends on what you mean by "connected to the network". If you are only interested in determining if the network is available (ie, the cable is plugged in and the NIC is getting a signal) you can use the NetworkAvailabilityChangedEventHandler delegate[^].
Using the AddressList property as you show above isn't the most reliable way to check as it may not return the addresses in the order you are expecting, so AddressList[0] isn't guaranteed to be the loopback address. (The better way to test if it is the loopback address is also to do if (IPAd == IPAddress.Loopback) or if (IPAddress.IsLoopback(IPAd)) .)
If you need to know if you are connected to the internet, the best options are to try to browse to a website or ping a known address.
Using ping:
bool internetAvailable = false;
Ping pinger = new Ping();
PingOptions pingOptions = new PingOptions(1, true);
byte[] pingResults = new byte[2];
PingReply pingReply = pinger.Send("www.microsoft.com", 25000, pingResults, pingOptions);
if (pingReply.Status == IPStatus.Success)
{
internetAvailable = true;
}
Using website:
bool internetAvailable = false;
Uri requestUri = new UriBuilder("http", "www.microsoft.com").Uri;
HttpWebRequest connectivityCheck = WebRequest.Create(requestUri) as HttpWebRequest;
connectivityCheck.Timeout = 25000;
HttpWebResponse connectivityResponse = connectivityCheck.GetResponse() as HttpWebResponse;
if (connectivityResponse.StatusCode == HttpStatusCode.OK)
{
if (!connectivityResponse.IsFromCache)
{
internetAvailable = true;
}
}
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Thank you for your reply, I dont need internet avaliability, but it is useful.
I think I can use NetworkAvailabilityChangedEventHandler, as you wrote. Thanks again;)
|
|
|
|
|
Hi,
is there a workaround for the following problem that occurs on .Net 2.0:
DirectoryInfo di = new DirectoryInfo(@"\\server.sub.domain.net\folder");
FileInfo[] aFiles = di.GetFiles("*.html");
On 1.1 this works fine, but version 2.0 it gives
************** Exception Text **************
System.IO.IOException: The network path was not found.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
If I replace name from UNC path with IP address or "short name" like \\server\, also 2.0 version starts to work.
Is there any fix available for this?
Br,
mjma
|
|
|
|
|
I am a new user to this site. I need to to know that how to convert a database file may be in access or in SQl in to html file.if anybody can help me in this
regards
shriya
|
|
|
|
|
There is no such conversion. An html page is not capable of carrying the kind of information that a database contains.
What is it that you want to do, really?
---
b { font-weight: normal; }
|
|
|
|
|
thnx for ur reply, i ws pretty worried as how to do it. finally when i surfed all the sites n didnt get it then thought for this option. thnk again for ur information
|
|
|
|
|
do u mind if i will put the real scanario of the problem, it may take much time for us.
thnx.
regards
shriya
|
|
|
|
|
Using SqlCommand and DataSet to Insert (Update, Delete) data into Database, which is better ?
How to use DataSet, SqlataAdapter with OOP ?
|
|
|
|
|
u can use SqldataAdapter's update method to update database,for this u have to define proper SqlCommand with proper parameters for inserting,updating or deleting the rows in specific table and then u have to assign these commands to SqldataAdapter's InsertCommand,UpdateCommand and DeleteCommand property.Then
based on the rowstate of table in dataset the appropriate command will be executed automatically by calling SqldataAdapter's update method
rahul
|
|
|
|