|
my question is about IE scripting.
I have 100 notebook client. In Company i have 131.107.2.0 domain.
my proxy server is 131.107.2.7
when employees at work, they can connect to internet using proxy.
But When thay at home, there is no proxy, they have direct internet connection generally.
They cannot connect to net unless they uncheck "use proxy server" at ie properties,connection tab, lan settings part.
So i wantto write a script to prevent this.
I wrote a script but it is not working.
Any idea or where i find any script to do this.
function FindProxyForURL(url, host) {
if ( isInNet(host, "131.107.2.0", "255.255.255.0")
{
return "PROXY 131.107.2.7:8080";
}
else {
return "DIRECT";
}
}
|
|
|
|
|
How about asking in the: Operating Systems / SysAdmin forum, people there might be better suited to this than C# people.
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
|
|
|
|
|
Hi,
My current situation is that: I'm using multicolum comboBox for displaying data in two columns, one for text description and second for its ID number. Now i want to retrieve ID number for the selected item/text. For this, implemented a function that returns ID for selected value. That is main scenario.
Here I need your suggestionS (please!):
1) Should i keep a DataTable for each combobox in memory for getting related data. OR
2) Should connect to database and retrieve required value from it each time when value change in the combo box.
With Thanks and regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
neither!
3) set the DataTextMember and DataValueMember properties then read the SelectedText or SelectedValue property as appropriate.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Thanks.
and
J4amieC wrote: set the DataTextMember and DataValueMember properties
of What?
Since start of this month I'm searching (and trying too) about combo box. Tried different properties but no result. At last i downloaded the article about "Multi-column combox" and started using that custom control, which atleast is displaying required information in columns. Why adopted this method (which is not standrized)? because of
1) time constratint and 2)its my first project in C# -- migrated from VB6.
Although i'm studying too, but obviously it takes time.
According to your suggestion again tried but no result.
Well Thanks alot and
Best Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
J4amieC wrote: set the DataTextMember and DataValueMember properties
Really put me in trouble. These are the web application properties. And i'm working with windows application.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
hai...
i was writing windows service using c#.net.then i got the following error.please give your suggestions
|
|
|
|
|
ratheeshkumar wrote: i was writing windows service using c#.net.then i got the following error.please give your suggestions
I suggest you actually post the error too.
|
|
|
|
|
i want the code for getting hierarchy structure using c#.net
prasanna
|
|
|
|
|
Hy guys I want to serialize to xml a matrix od double bet when I try to do this:
XmlSerializer(typeof(double[,]));
I get a runtime error.
What is the correct way. p.s code snippet will be apprecited
Thank. Mirko
|
|
|
|
|
Convert the double[,] to double[][]
|
|
|
|
|
Thankyou a lot for the answer but for the following code
System.Xml.Serialization.XmlSerializer xmlSer =
new System.Xml.Serialization.XmlSerializer(typeof(double[][]));
when executed the compiler get the following message:
"The assembly with display name 'mscorlib.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=....' or one of its dependencies. Impossibile trovare il file specificato.
File name: 'mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=....'
=== Pre-bind state information ===
LOG: User = ....
LOG: DisplayName = mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...., processorArchitecture=x86
(Fully-specified)
LOG: Appbase = ....
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=....
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: mscorlib.XmlSerializers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...., processorArchitecture=x86
LOG: Attempting download of new URL file:///.../bin/Debug/mscorlib.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///.../bin/Debug/mscorlib.XmlSerializers/mscorlib.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///.../bin/Debug/mscorlib.XmlSerializers.EXE.
LOG: Attempting download of new URL file://.../bin/Debug/mscorlib.XmlSerializers/mscorlib.XmlSerializers.EXE."
|
|
|
|
|
P.S
when I simply write
System.Xml.Serialization.XmlSerializer xmlSer =
new System.Xml.Serialization.XmlSerializer(typeof(double[][]));
it work perfectly
|
|
|
|
|
Sooorrrrry for the last post but it's wrong
when I write
System.Xml.Serialization.XmlSerializer xmlSer =
new System.Xml.Serialization.XmlSerializer(typeof(double));
It work well (but don't deserialize the things that I want)!
|
|
|
|
|
The problem that you're having there is definitely weird. It sounds like it's unable to locate the dll it uses for XML serialization. I tried it on my machine and didn't have any problems. Here's the code I used:
double[][] d = new double[2][];
for (int i = 0; i < 2; i++)
{
d[i] = new double[2];
for (int j = 0; j < 2; j++)
d[i][j] = i + j;
}
XmlSerializer xs = new XmlSerializer(typeof(double[][]));
xs.Serialize(Console.Out, d);
This actually did serialize my array without a problem. I would say you might want to try searching the KB articles on Microsoft to see if anyone else has that error. If that doesn't turn up anything, you might want to find someone with an MSDN subscription that can report the error for you.
Logifusion[^]
|
|
|
|
|
As far as I know, you can only serialize 1 dimensional array.
If you want to serialize more than 1 dimensional array, try to use BinaryFormatter.
Example:
double[][] d = new double[2][];
for(int i = 0; i < d.Length; i++)
{
d[i] = new double[2];
}
BinaryFormatter b = new BinaryFormatter();
using(FileStream fs = new FileStream("test.bin", FileMode.Create))
{
b.Serialize(fs, d);
}
|
|
|
|
|
When you do XmlSerialization you cannot just do something like what you are trying to do. If , however, you defined something like this:
[Serializable]
public class DoubleArray
{
double[,] data;
[XmlArray(typeof(double[,])]
public double[,] Data
{
get{}
set{}
}
}
public class UseStuff
{
DoubleArray array = new DoubleArray();
...
XmlSerializer ser = new XmlSerializer(typeof(DoubleArray));
using ( FileStream stream = File.Create(path) )
{
ser.Serialize(stream, array);
}
}
That is the correct way to serialize that data.
|
|
|
|
|
Hi,
Iam new to c# , can any one help me how to make a dragable window inside a mainwindow similar to the errorlist or output box inside vs.net.
Thankyou
Regards
Praveen
|
|
|
|
|
Hi,
there is no inbuilt support for this. Either you have to buy a component (e.g. DevExpress) or have a look at this free component.[^]
|
|
|
|
|
how can i set the attribute of file or directory that everyone can write in NTSF?
|
|
|
|
|
Good day
I am new to C# and .NET. I am playing around to get the basics under my belt. I am stuck. I am creating a project the makes use of a Data Layer, Business layer, and a presentation layer. I am having problems retrieving data from the database(SQL Server). What the program can do at the moment is it can retrieve data from the DB and display it into a listview. But what I am struggling with is once you click on a person
in the first listview, the details for that person should appear in the other listview. I have having problems. I make use of interfaces as well.
Please assist.
Thanks
J9
|
|
|
|
|
Providing some code that you are doing would really help for pinpointing the problem. But here is a highlevel design I would implement:
Windows Form -- class that contains the two listboxes
the select event in the main box causes a lookup
and populate of the second listbox.
'business layer' -- exposes general methods for the form.
public PrimaryData GetPrimaryList(string key)
{
return GetPrimaryDataObjects(key, connection);
}
public SecondaryList GetSecondaryList(string key)
{
return GetSecondaryDataObjects(key, connection);
}
Finally the datalayer -- gets data and exposes the two methods used above.
Now, if you have problems then the first thing to do is begin doing breakpoints and run in Debug mode. I'd set a breakpoint on the event of selecting an item in the primary list. Single step (F11) through everything and validate you are actually passing around the data you think you are passing around. Do QuickWatch on specific items and verify you have everything you should.
Once you have a point where you've constructed a query, QuickWatch that and then copy it into Query Analyzer and make sure that the query actually works when you manually point it at your database.
Those are just the first two steps I'd take in getting the answer to my own qauestion.
|
|
|
|
|
Hi Everyone,
I am new to c# , can any one help me how to move around a tool strip During runtime, using the grip.
Thank you,
Regards
Praveen
|
|
|
|
|
I'm using C# in VS2005 to do some XPath queries. I've created my XPath statement using XMLSpy and it is something like:
//Unit/concat(productCode, ":", serialNumber)
I also tried with string-join, but I get the same error when I try it in my C# code:
Unhandled Exception: System.Xml.XPath.XPathException: '//Unit/concat(productCode,":",serialNumber)' has an invalid token.
Surely the concat function exists in the .net xpath library, am I doing something wrong?
The code around this is the standard routine:
xpathDoc = new XPathDocument(Filename);
xpathNav = xpathDoc.CreateNavigator();
xpathIter = xpathNav.Select(XPathString);
- loop through the results etc -
I hope someone has some pointers as to what could be wrong
Thanks
|
|
|
|
|
Try this code for xpath query
//Unit[concat(productCode,":",serialNumber)]
Put your xml file and the code where you assign value to XPathString, So that someone could help you.
|
|
|
|