|
Sorry guys nevermind managed to find a way around, here's the answer for those of you who ever have the same problem:
.NET 3 just includes a few extra components etc and actually runs on top of .NET 2 (when you install .net3 it installes .net2 first). in IIS you can't actually set an app to run in .net3 but the extra components should be available to you.
Paul Keys
Director
Ingwe Business Solutions, South Africa
www.ingwesolutions.com
|
|
|
|
|
I'm writing a C# Windows/.Net 2.0 app which will take a large XML document as an initial input. My form has 4 basic controls: 3 comboboxes (Country, State, and City) for filtering the XML data and a DataGrid to display the results. The XML doc has this format:
<updates xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<locations>
<country name="United States">
<state name="California">
<city name="Santa Monica">
<location id="2" venue_id="1" category="Hotel" name="Example Hotel" address="3214 Wilshire Blvd." zipcode="90404"/>
<location id="3" venue_id="2" category="Airport" name="Santa Monica Airport" address=" 3223 Donald Douglas Loop"/>
</city>
<city name="Los Angeles">
<location id="4" venue_id="3" category="wwan" name="Cell Carrier GPRS Network" address="Entire LA Metro Area"/>
</city>
<city name="San Diego">
<location id="5" venue_id="1" category="Hotel" name="Mike Hotel" address="3214 Mike Blvd." zipcode="90414"/>
<location id="6" venue_id="2" category="Airport" name="John Airport" address=" 3223 john Douglas Loop S Ste 3"/>
<location id="7" venue_id="1" category="Cafe" name="New Hotel" address="3214 New Scott Blvd." zipcode="90434"/>
<location id="8" venue_id="2" category="Bar" name="New Airport" address=" 3223 New Douglas Loop S Ste 4"/>
</city>
</state>
<state name="Colorado">
<city name="Colorado Springs">
<location id="2" venue_id="1" category="Hotel" name="Example Hotel" address="3214 El Paso Blvd." zipcode="90404"/>
<location id="3" venue_id="2" category="Airport" name="Colorado Springs Airport" address=" 3223 Airport Drive"/>
</city>
<city name="Denver">
<location id="4" venue_id="3" category="wwan" name="Cell Carrier GPRS Network" address="Entire COSP Metro Area"/>
</city>
</state>
</country>
</locations>
</updates>
I have no problem using XPath queries to extract the values to populate the Country, State, and City comboboxes; each selection drives the data in the subsequent combobox. Upon selection in the City combobox, I can query for a resulting set of 'locations'. My problem is how to stuff this XmlNodeList into a DataSet which I can then use with my DataGrid. I have no problem reading an entire document into a DataSet
DataSet ds = new DataSet();
ds.ReadXml("Test.Search.xml");
but have no idea how to stuff an XmlNodeList into one.
Thanks.
Jack80918
|
|
|
|
|
Unfortunately, I don't think there is currently support on the NodeList or Navigator objects to do that. Besides, I would recommend that you rather create the appropriate DataTables and DataColumns manually for this operation and then use the Iterator to populate your DataSet manually.
It won't be alot of work and you still have the power to specify your types to the column.
Daniel Minnaar
Lead Software Developer
|
|
|
|
|
Anyone?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I've used it for a couple of clients who didn't want to pay for an editor. What do you need to know?
|
|
|
|
|
Yes, It's very nice. I use it on my site in the CMS to easily create new pages
http://www.antiyes.com/
|
|
|
|
|
(A) I have a MFC static library that defines some classes that do some speciffic work.
(B) I have a C++ CLR console application that uses the library from A. Both are compiled to use MFC as shared library. The target of this project is to prove that the code in A is working in .NET, and the code from A can be reused.
When running B, it crashes with this error:
[...........]
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[...........]
The Output console contains:
[...........]
'PipeManagerDotNetTesterServer.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', No symbols loaded.
First-chance exception at 0x78375508 (mfc80ud.dll) in PipeManagerDotNetTesterServer.exe: 0xC0000005: Access violation reading location 0x00000000.
A first chance exception of type 'System.AccessViolationException' occurred in Unknown Module.
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[...........]
Any ideas ? because the code in A was tested in an usual(no .NET) C++ console application with MFC support and it works well.
thanks
|
|
|
|
|
This questiom should be asked in the Managed C++ forum.
|
|
|
|
|
How would I translate from one .NET language to another programmtically (prefrably counting MSIL as a language, but not neccassarily).
I have searched through the CodeDOM class, but nothing in there seems helpful.
Thanks in advanced,
Fahad
|
|
|
|
|
There is probably better ways to do this, but one method I have used to translate from VB.NET to C# is by using Lutz Roeder's brilliant Reflector. This is anyway a very useful program. In it, you can load a compiled assembly and dissamble classes in the language of your choice. It supports C#, Visual Basic, C++ and Chrome.
You can download Reflector from here: http://www.aisto.com/roeder/dotnet/[^]
|
|
|
|
|
I know about reflector. I was asking how to do this in my own programs (I am sure I read somewhere that it is possible)
|
|
|
|
|
can anyone help me give suggestion in making setup with trial version
|
|
|
|
|
Take a copy of the existing code, and remove/limit some of the features. </obvious>
Have the installer automatically install the parts that are the same, then ask for a serial number. If none is provided, install the trial version of the rest, otherwise install the full version.
To stop this from being bypassed, have the full version check a license file.
(do not make the trial do this, as a faked file may unlock some things).
A good license file would be a mac address, full name, organisation and time and date of install, all md5'ed with a key that only you (and your program) knows.
|
|
|
|
|
Alternatively, allow the user a time limit to which they use the application for.
You'll have to implement some hack-proof techniques though, because the most obvious hack would be to turn back your computer time.
Daniel Minnaar
Lead Software Developer
|
|
|
|
|
|
Hi,
I have regular expression for a phone number. The rules i want are; 10 and only 10 digits and any characters in between.
eg.
"0123456789"
"(01)23456789"
"(01)23 456 789
"0123 456 789
"0 1 2 3 4 5 6 7 8 9"
"01 23 45 67 89"
are all acceptable
the regex i have is:
"([^0-9]{0,}[0-9][^0-9]{0,}){10}"
everything works ok except for detecting numbers that are too long (i.e. more than ten characters). I already have a work-around for this, i am just interested to know how to achieve the same thing in a regex.
cheers to you.
|
|
|
|
|
handle keypress event
count the pressed in chars. if =10 e.Handled = true.
Hope this helps
cheers, geri
|
|
|
|
|
so I would do sg like
<br />
int count=0;<br />
if(Char.IsNumber(e.KeyChar))<br />
{<br />
count++;<br />
}<br />
if(count==10)<br />
e.Handled=true;
<br />
& count-- if user deletes.....(so presses like: e.KeyChar = '\u0008' >> backspace, i guess )
geri
-- modified at 2:46 Thursday 29th November, 2007
|
|
|
|
|
Hi,
thanks for the reply, but my question was specifically to do with regular expressions.
thanks anyway.
|
|
|
|
|
Put $ at the end:
"([^0-9]{0,}[0-9][^0-9]{0,}){10}$"
Regards
|
|
|
|
|
This would have no effect, the beginning is not limited.
"^([^0-9]{0,}[0-9][^0-9]{0,}){10}$" fixes this.
(in your regex, the number 12345678901 would have caused the underlined part to match.
|
|
|
|
|
oops, absolutly right
Regards
|
|
|
|
|
Thanks, that works just as i need it.
I had tried the $ character at the end, but not in conjunction with ^.
Thanks to Mabo42 to the reply as well.
|
|
|
|
|
can i install .net frame work in windows 98
|
|
|
|
|
according to MSDN:
you can install 1.1 redist
cheers, geri
|
|
|
|