|
So how do expect us to know? What you described is a bespoke solution and not something I heard of, so get in touch with the holiday maker, or better, dont make releases till he is back.
|
|
|
|
|
Hi,
I have one table which contains a list of items, displayed on a datagrid in a windows form. When i double clicked to select a particular item, the details of that item will be shown in a new form. I can change the details of that item, say quantity and color. Or i can also add in a new item to the item list. My question is how to merge back this table to the previous table so that the item list can show both updated item and newly added item on the datagrid?
Thank you.
Keen
modified on Friday, June 13, 2008 10:22 AM
|
|
|
|
|
DataSet.Merge() not working?
Maybe loop through the rows and overwrite with the other.
|
|
|
|
|
Hi friends.
I have a XML file like this :
<node name="browser"><br>
<BookMark name="Mozilla1" Href="http://..../"/><br>
<BookMark name="Mozilla2" Href="http://..../"/><br>
<BookMark name="Mozilla3" Href="http://..../"/><br>
</node></br></br></br></br>
I want read the node with "Mozilla2" attribute , but I don't know how I can ?
Can you help me ?
Sorry for my English. I'm a freshman .
|
|
|
|
|
Read about XPath, I cant give you exactly what you need, but that is what you want to use
|
|
|
|
|
Thanks leppie. Can you write sample code or reference ?
Sorry for my English. I'm a freshman .
|
|
|
|
|
|
Hi,
I am developing an app using C#, asp.net and vs2008, i want to replace the current doctype
[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ]
with a different version
[!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]
when specific pages are displayed, so im just wondering if this is possible and if so what i need to be searching for?
Thanks in advance
Tim
|
|
|
|
|
You want to change this at runtime?
Maybe a placeholder or a literal maybe?
|
|
|
|
|
yes i need to change it at runtime basically because i need to apply CSS layout to 2 specific user controls but if i change the doctype for every page the entire web app is centered on the page, thanks for your reply ill check out these options
Tim
|
|
|
|
|
Hello to all!
I've got problem with getting values from combobox. Code below how i get data from database and populate it in combobox. The problem is that few lines below this code i need to get value member value when something is selected in this combobox. With this code VS compile successfully. But the result is not correct. I'm not sure that this code actually works correct.
comboBox2.ValueMember = Issues.Tables[0].Columns[0].ToString();
If you understand me can you help me?
String ConnStr = settings.ConnectionString().ToString();
String SQLIssues = "SELECT issueid, projid, summary FROM issues";
SqlDataAdapter IssuesAdpt = new SqlDataAdapter(SQLIssues, ConnStr);
DataSet Issues = new DataSet();
IssuesAdpt.Fill(Issues);
foreach (DataRow Issue in Issues.Tables[0].Rows)
{
comboBox2.Items.Add(Issue[2]);
comboBox2.ValueMember = Issues.Tables[0].Columns[0].ToString();
}
King Regards!
countNazgul
|
|
|
|
|
i have an input TextBox ,now i want to caputer the CTRL+V Acsi Code on the Textbox of the window form how can i capture ?
when i see this code CTRL+V code in the Debug mode its shows some Speical Character.
|
|
|
|
|
Ctrl+V doesn't have an ascii code. You need to check if ctrl is pressed and watch for V being pressed.
Simon
|
|
|
|
|
When I run the following code from inside the Visual Studio, it works fine, but when I run the exe, it restarts my machine.
I have written the following code:
System.Diagnostics.Process[] prs = System.Diagnostics.Process.GetProcesses();
foreach (System.Diagnostics.Process proces in prs)
{
try
{
if (proces.ProcessName.ToLower().ToString().Trim() != "" && proces.ProcessName.ToLower().ToString().Trim() != "manageallprocess.vshost" && proces.ProcessName.ToString().Trim() != "ManageAllProcess" && proces.ProcessName.ToLower().ToString().Trim() != "devenv" && proces.ProcessName.ToUpper().ToString().Trim() != "EXPLORER" && proces.ProcessName.ToString().Trim() != "Explorer" && proces.ProcessName.ToLower().ToString().Trim() != "explorer" && proces.ProcessName.ToLower().ToString().Trim() != "system" && proces.ProcessName.ToLower().ToString().Trim() != "idle" && proces.ProcessName.ToLower().ToString().Trim() != "svchost" && proces.ProcessName.ToUpper().ToString().Trim() != "SVCHOST" && proces.ProcessName.ToString().Trim() != "SvcHost")
{
proces.Refresh();
if (!proces.HasExited)
{
proces.Kill();
proces.WaitForExit();
}
}
}
catch (Exception exc)
{ }
-----Have A Nice Day-----
|
|
|
|
|
I think you need a bit more experience before you start killing processes!
Neeraj Kr wrote: proces.ProcessName.ToLower().ToString().Trim() != "svchost" && proces.ProcessName.ToUpper().ToString().Trim() != "SVCHOST" && proces.ProcessName.ToString().Trim() != "SvcHost")
all do the same thing - you only need one of them
More worryingly, and the cause of your problem I expect, is the fact that unless the process is in your list it will be killed. This will kill all sorts of system processes by the look of it.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yea, that is why I am putting a condition on SVCHOST and the application name through which I am running the kill process. Also, I have put a condition that all the explorer windows that are open do not get closed.
What do you suggest???
-----Have A Nice Day-----
|
|
|
|
|
Neeraj Kr wrote: What do you suggest???
What exactly are you trying to achieve?
To me it looks like your code is trying to kill all running processes except Explorer, SvcHost and your own app. Why do you want to do this?
Simon
|
|
|
|
|
Simon Stevens wrote: To me it looks like your code is trying to kill all running processes except Explorer, SvcHost and your own app
Exactly. This is what I want to achieve. This is a customer requirement.
-----Have A Nice Day-----
|
|
|
|
|
Neeraj Kr wrote: Exactly. This is what I want to achieve. This is a customer requirement.
This is a stupid customer requirement. Killing all processes will always restart the PC because you will be killing critical OS processes. (The only reason it doesn't when you run from inside visual studio is because VS is preventing your app from doing stupid things)
Tell your customer that they don't really want to do that. Ask them what they are trying to achieve by killing all processes.
Simon
|
|
|
|
|
ha ha ha. Actually they already have a third party tool which does the same thing, but does not restarts the system.
They actually want a proprietory product.
-----Have A Nice Day-----
|
|
|
|
|
What the third party app will be doing is only killing non-critical processes.
Find out the real requirements from your customer. They don't really want to kill all processes, because that will cause a system restart. Find out what they actually want.
I suspect they want something like, close all open applications. In which case, you need to find a way of only closing user apps and not just blindly killing all system processes.
You should probably be using process.Close() instead of kill. This gives the exiting processes a chance to clean up their data.
Either way, the important point here is to ask the client what they actually want and why they want to do it.
Simon
|
|
|
|
|
Simon Stevens wrote: To me it looks like your code is trying to kill all running processes except Explorer, SvcHost and your own app
Exactly. This is what I want to achieve. This is a customer requirement.
-----Have A Nice Day-----
|
|
|
|
|
Umh, killing svchost on Windows is never a good idea.
Besides that, why don't you call proces.ProcessName.ToUpper().ToString().Trim() just once for each process in the list? Also, comparing something not in uppercase to this string will always result in false , so the != comparison is pointless.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
yea, I know that killing the svchost on windows is not good that is why I have put a check on that. Though, I guess could have written one condition for one process and not three different.
What else do you suggest please.
The problem is that when I run the application from VS 2008, it runs fine, but when I run the exe, it reboots my system.
-----Have A Nice Day-----
|
|
|
|
|
Assuming it is related to your process stomping, put a confirm dialog ahead of each kill and wait a minute or so between each yes click. That'll let you know what process's death is taking the system down.
The requirement itself is a major WTF, there has to be a better way to accomplish whatever the clients actual objective is.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4....
-- El Corazon
|
|
|
|