|
i cant find it.
at the solution explorer it have
Solution "windowsapplication4" (1 project)
- WindowsApplication4
- - Properties
- - Reference
- - Form1.cs
- - Program.cs
- - Settings.cs
|
|
|
|
|
Well, you can add one if you don't see it. I always see them in my projects, tho.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Issit
Name | Type | Scope | Value
setting string User
so i just change the string to (connection String) and set the value there?
how does the value look like?
Issit when i compile, i don have to declare the connection string again?
|
|
|
|
|
http://www.ajaxline.com/node/258[^]
I recommend reading the article I link to in my sig.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I suggest doing some reading. Yes, the point of a config file is that you store values which can be changed by the end user, but you don't need to enter them again.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Add new item to your project. Select Application Configuration File. It is not added automatically in VS2003.
|
|
|
|
|
i am using Microsot Visual Studio 2005
When i select add new Item, i have SQL Database file and Settings File.
I selected settings file
|
|
|
|
|
Well, is the project Windows Application project?
It should be Application Configuration or something similar (don't have VS now).
|
|
|
|
|
Hello all,
I'm trying to change an attribute in an XML document based on some criteria,
I'm using C#, For example I need to do a "search" based on a person's user id,
the user id is an attribute of a node name student.
if the userid matches a text box I then need to change the Grade attribute of the student.
for example, my xml document looks like this
<!--List of students. -->
<Students>
<Student userID="567" Registration="Reg268" Grade="A" Subject="Math"/>
<Student userID="345" Registration="Reg951" Grade="B" Subject="Science"/>
<Student userID="475" Registration="Reg195" Grade="B" Subject="Science"/>
</Students>
I want to 'search' for student 345 and then change the Grade to an 'A'
Any help would be greatly appreciated.
JC
|
|
|
|
|
You can select a node in an XmlDocument using Xpath and then use the Attributes collection to access/change an attribute.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for your help..
How I got it to work.
created a new element,
assigned the old node to a new node specific to my search criteria
newnode = root.SelectSingleNode("Students/Student/[@userid='" + loginform.userid + "']");
I then created a new attribute
and used the append function to add the newly created attribute as the last attribute.
saved the document... and it worked..
hope this help someone....
thanks again.
JC
|
|
|
|
|
how to create a C# program that directly controls the activity of the computer such as creating a folder, deleting a file etc.
|
|
|
|
|
For creating folders, deleting files, file properties, etc, take a look at the System.IO namespace.
|
|
|
|
|
And try reading the 'how to get an answer to your question' sticky post at the top of the forum.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i dont know what to do to this one.. can someone tell me the codes for this.. from a multiline textbox save to a ms word format in the database..
ginji
|
|
|
|
|
Well, if you want to create a doc, you can go the docx route and work out hte format, or you can use the Microsoft toolkit for Office to create a word doc. Of course, Word will read your multiline text file anyhow.
And the database is a whole different, unrelated step.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how?? im just new at c# and im just learning it little by little
ginji
|
|
|
|
|
Sounds like you need to learn some basics before you worry about databases and word documents.
Like I said, Word can read your txt file.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to be able to save myself writing a lot of code and use the CodeDOM to do some dynamic generation. I'll try my best to explain it :-/
I have several classes all which have a "Create" method and all create different windows components for example
Class ButtonControl
{
public static void Create(ButtonValues values, Button button)
{
button.Text = values.Text;
...
}
}
Class LabelControl
{
public static void Create( LabelValues values,Label button)
{
Label.Text = values.Text;
...
}
}
Then i want to be able to dynamically call one of these from a function like
void CreateControl(string TYPE, Control selected)
{
TYPE.Create(values, selected);
}
And i don't have any idea how to pass the parameters like that with the CodeDOM i have little experience with it, any help would be appreciated
|
|
|
|
|
CodeDOM is for generating code, which you can then compile and run.
It sounds like you are looking to create controls at runtime, you might be better served with Activator.CreateInstance(...) and the System.Reflection namespace.
|
|
|
|
|
Thanks, i managed to do it very easily with reflection
|
|
|
|
|
Hi there.
Already I was using PHP .
In PHP we can get program's number line, for example the following code writes 9 in out pot.
1 <?php
2
3
4
5
6
7 8
9 echo __LINE__;
10
11
12
13 ?>
Now , I want to know whether we can get program's number line in C# when the program is running?
Freshman
|
|
|
|
|
M-Dayyan,
AFAIK, I don't think you can. Whats the reason you want to print out the line number?, i am guessing its debugging related?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hi,
it is possible, but not very easy; there is no predefined symbol as in C/C++.
you can figure out where you are (and how you got there) by reading
Environment.StackTrace; you could even create a method that takes the second
entry (skipping the method itself) to extract the classname, methodname, and
line number.
The line numbers may or may not be present depending on circumstances such
as debug/release build.
|
|
|
|
|
Thanks Luc Pattyn.
Freshman
|
|
|
|