|
I have a xml file and datalist,I put label on datalist and I want to bind it to xml file.
The definition of xml is something like this:
<?xml version="1.0" ?>
- <Something xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Title>MFC</Title>
<Title>Button</Title>
<Title>RichEdit</Title>
<Title>EditBox</Title>
<Title>ComboBox</Title>
</Something>
I want to bind Title to labels of datalist I don't know how to do it,is that correct:
Read the xml file with xmlreader then bind a table to data list?If it is correct I don't know
one thing about databining:
DataBinder.Eval(Container,?????-->what should be here?)
thanx
<html><FONT face="Lucida Handwriting, Cursive">Mazy</FONT></html>
<small>"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here."<br>Wish You Were Here-Pink Floyd-1975</small>
|
|
|
|
|
I need to get ahold of C# functions such as pow, abs, etc. min and max would also be nice. Do they exist ? Where ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Got it. I typed System.Math and intellisense did not find it, so I assumed it did not exist. I need to get Visual Assist on here, pronto.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
need to get Visual Assist on here,
They have a Visual Assist beta for VS.NET
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
I know, thanks, I just had not reinstalled it just yet after all the hassles I had getting .NET installed at all.
Intellisense is working, Matk is a class. How gay - I have to type Math.Min when I want to min something ? I suppose I could type Math m; m.Min, but it still sucks.
C# is pretty cool though, but I need to do some testing. I am convering an image library I wrote using GDI+ in C++ and I think initially it is orders of magnitude slower doing exactly the same thing as the C++ code I wrote prior.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
Matk is a class. How gay - I have to type Math.Min when I want to min something ?
Welcome to the world of "everything is an object"
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Christian Graus wrote:
Intellisense is working, Matk is a class. How gay - I have to type Math.Min when I want to min something ? I suppose I could type Math m; m.Min, but it still sucks.
Funny how I lile the fact that I have to type in the class name first and then it's method to use it, while you think it is naff. I guess I like the structure of it, it helps to structure the app in my head better than if all I had to type was Min.
Just FYI, and you probably do know this, you can instead of doing Math m do using m = System.Math; . Has much the same affect, but it is across your whole class, not just a procedure.
And the old way would be to just wrap it in a normal function called Min of course
I must say .NET is the first system that I have really started to understand the underlying structure of. VB I just cruised along and did not really care much whether something was an object, class, blahdingaling or whatsamacallit. But with .NET the whole framework of classes and namespaces really just works for me. I certainly now see the advantage of understanding the underlying strutcute when it comes to developing
*sigh* there go my days of sticky-tape-and-glue APPs
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
Paul Watson wrote:
Funny how I lile the fact that I have to type in the class name first and then it's method to use it, while you think it is naff. I guess I like the structure of it, it helps to structure the app in my head better than if all I had to type was Min.
I dunno what VB offers, but in C++, math is a library which provides these functions, so I am just used to the language offering maths facilities without the need for my code to be full of Math.
Paul Watson wrote:
Just FYI, and you probably do know this, you can instead of doing Math m do using m = System.Math;. Has much the same affect, but it is across your whole class, not just a procedure.
Yes, I realise that, thanks. It gives me the overhead of creating a class and still looks ugly.
Paul Watson wrote:
And the old way would be to just wrap it in a normal function called Min of course
As a C++ programmer, the old way is to wrap it in a macro, so it occurs in place. I am writing image processing code, as you will see when Chris posts the first article. Is there a way to inline code in C#, do you know ? Image processing is an area where every clock cycle counts.
Paul Watson wrote:
I certainly now see the advantage of understanding the underlying strutcute when it comes to developing
I suspect based on what I hear that VB.NET is structed a lot better than prior versions, so it's no wonder that it's now making such things clear to you. ON the other hand, I feel C# is hiding too much from me, but I can certainly see how that is helping me develop this thing faster than I would in C++, which is a *good* thing. But it is a ton slower to process the same image as the equivelant C++ code, and I dunno how much of that is ways I cannot optimise code compared to the C++ version, and how much is the CLR.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
As a C++ programmer, the old way is to wrap it in a macro, so it occurs in place. I am writing image processing code, as you will see when Chris posts the first article. Is there a way to inline code in C#, do you know ? Image processing is an area where every clock cycle counts.
Actually - as a C++ programmer, you would wrap it in an inline function.
Dale Thompson
|
|
|
|
|
Dale Thompson wrote:
Actually - as a C++ programmer, you would wrap it in an inline function.
Not if I was doing image processing. I hate macros, but the inline keyword is a suggestion which the compiler is free to ignore, so a macro is the best way of knowing for sure the code is running in place.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
I havent really tried C# much, and have been using VB.NET with no IntelliSense problems. Does it not work as well is C#? What is "Visual Assist"?
Oh, in VB.NET, if I type "system.math" it automatically changes it to "System.Math". does this happen in C#?
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
www.wholetomato.com - it has a 30 day trial, try it for yourself. It does a LOT more than just intellisense. But for intellisense, how about being able to specify the scope from which you want to see options, if you want to see public, protected or private items, if you want to see functions, or variables, or enums. In any combination.
VA does the case correction, C# does not by itself.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Thanks for the info
Christian Graus wrote:
VA does the case correction, C# does not by itself.
Thats the impression I got. I must say, it strikes me as silly that that is the case however. It means that whatever is doing the case correction is not built into the editor, but actually into the bit that each language provides to plug-in to the editor. Or at least, so it would seem.
After being used to it in VB since 16-bit VB3, it certainly takes a bit of getting used to
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
David Wengier wrote:
I must say, it strikes me as silly that that is the case however.
Well, VB is not case sensitive, SomeClass and someclass is the same thing. In both C++ and C# SomeClass and someclass is two different classes because the languages are case sensitive. Because of that I think it would be *very* dificult to make C++ and C# correct the case for you.
I mean, if you have 2 int's called IntOne and intOne, and you just typed intone, which one should the IDE select?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
This is a very good point, which in fact I didnt know about C#.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Anders Molin wrote:
I mean, if you have 2 int's called IntOne and intOne, and you just typed intone, which one should the IDE select?
This is a problem I have with VA at work - our class library includes try/catch wrappers which specify a HRESULT called hResult. Every time I type hResult, it turns it all to capitals, as it does not expand the macro and see the variable name.
If VB is not case sensitive ( and how gay is THAT ? ), then the IDE isn't doing any case correction at all, it's simply ignoring it - right ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
If VB is not case sensitive
It isn't case sensitive
Christian Graus wrote:
how gay is THAT ?
And the VB programmers proclaim that it is gay that C/C++ IS case-sensitive.
Until you get used to it, there doesn't seem to be any reason for case to matter; why would you want a variable named foo and Foo ? Once you're used to it you quickly realize that (according to my style) foo is protected and Foo is public.
When I coded in VB since case matter I prefixed private members with _. A practice many C/C++ people have followed as well.
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
James T. Johnson wrote:
When I coded in VB since case matter I prefixed private members with _. A practice many C/C++ people have followed as well.
Okay, I know I will get flamed for this, but why prefix private members with anything? I dont expose variables publically, but use property methods that are public, so I never have public variables. As for private methods, why would you prefix them at all?
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
oops, guess I shouldn't be replying to messages after I wake up from sleeping on a long ride home.
I should have said private variables; because in many cases in my code a private variable would have a public get or get/set property defined for it.
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
James T. Johnson wrote:
I should have said private variables; because in many cases in my code a private variable would have a public get or get/set property defined for it.
ahhh yes... I use "m" as a prefix, so I know the variable is "mine".
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Christian Graus wrote:
I need to get Visual Assist on here, pronto.
I think vs.net behaves bit more nicely than the vstudio for intellisense. Its able to pickup most of the classes and variables.
But I've read somewhere(dont remember where i read) that VA is not so stable for vstudio.net, I guess the beta status explains that a bit.
Cheers
Kannan
|
|
|
|
|
Can someone tell me whats the sprintf equivalent in c#.
I want to format a string, an sql statement (insert into ...) based on some values.
thanks
Kannan
|
|
|
|
|
There is nothing as evil as sprintf in C#, but a facility similar to ostringstream is StringBuilder.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
String.Format it takes the same arguments that Console.WriteLine does which allows you to specify some formatting options similar to ?printf. Here is a link to the format string specification.
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
Thanks.
I have another question.
Whenever I use a 'String' type in c# most of the times I end up calling the member functions directly without creating any instance are they static methods(for ex. System.String.Format), which in turn return a 'string' type.
'string' is the simple type - does this encapsulate the 'String' type of the framework.
Also, I understand I dont have to do a 'new' to access the 'string' types while the 'String' requires a 'new'.
Is that true that variables of type 'string' is created in the stack and the 'String' is created in the heap.
regards
Kannan
|
|
|
|
|