|
Sorry, but we're not doing people's homework in here.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I am not sure, if it is a C#,.NET or ASP.NET question.
but i need this in my asp.net site, i have to convert a string passed as a query string to be converted to GUID.
Please tell me how to do this.
Thanks
Apurv
A man is but the product of his thoughts. What he thinks, he becomes.
.......Mahatma Gandhi
Be the change you want to see in the world.
.......Mahatma Gandhi
|
|
|
|
|
The GUID structure has a constructor that takes a string. Have you tried using that?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
And why it's not a .Parse method I have no idea.
|
|
|
|
|
hai all,
we developed windows application and we tried to deploy this application in client machine using installer class(VS 2005 with custom actions), we have to find the installed path of the application in client machine while installing using c#
Thanks & regards,
vishnu.
|
|
|
|
|
|
|
Hi....
I am new to excel programming.I have a small problem creating histogram in excel using C#.I have to carete histograms for a discrete data.Can somebody help me out undertsanding this and letting me know what actually a histogram with discrete data looks like.Please do help me out.
Thnk You.
|
|
|
|
|
In order to do it from C# in Excel, you have to understand how to do it in Excel first. Start reading these[^].
|
|
|
|
|
I have created some module in C#.net Visual studio 2005. Now I want to incorporate them under a single project.I need to assign the permission of each module's Controlls based on User previllage. So to assign the permission I think, I need to know all modul's forms and control. It may get from each modul's design.cs file easily. but I want to access them from a MDI form where all module are chiled of that MDI and want to assign permission based on user previllage.Now question is that how can get the all modul's forms and control's properties from that MDI form.
|
|
|
|
|
Dear SayemAhmed!
It is not possible to get all the properties name except from the .cs file.
Thanx.
NNur
|
|
|
|
|
Reposting the same question won't change the answer. What you want to do is not practical and a nightmare to support. Each module/form/whatever in your app should be checking the user object you have and responding accpordingly itself. Try to go through the entire project and "set this, setup that, change this" is extrodinarily inefficient and the code must be updated coninuously as the application changes.
|
|
|
|
|
Hi,
which are the best pratices of using xml as database? can i query it like in sql server? wher linq fits here?
links appreciated thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Using XML as a database is generally a bad idea because it's a lot slower than using an actual database. LINQ helps a little, but I certainly wouldn't want to write a crapload of code to do it. Not only do you have to load/save the data continuously, you have to worry about rolling back transactions, and other stuff that the database server usually takes care of.
Generally, if the data in your XML file exceeds 1mb, and has more than just a few "tables", it's a better idea to use a real database.
"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
|
|
|
|
|
Hi,
how can i save the contents of a dgv to a xml file?
i know how to read from xml to dgv. because the dataset has more that one table and the datagrid only display one table, im affraid o mess it when saving.
I Checking it know, but if anyone can direct me to some link or code would be helpfull
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Move your data to a DataSet/DataTable object(s) and the rest is easy. It's save to an XML file in one statement.
|
|
|
|
|
cast your datagridview.DataSource to DataTable then save its contents to XML file
DataTable myDataTable =(Datatable)dgv.DataSource;
myDataTable.WriteXml(filename);
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
I have given a task to do a rough design document on instrumentation (tracing) plan in our application. Can anybody please give me link to good article or share their ideas? (I searched , still searching for good article.)
Thanks.
|
|
|
|
|
Hi,
I have png and xml files embedded in a project. I can access them with the code bellow.
DataSet MyDataSet = new DataSet();
Assembly ThisAssembly = Assembly.GetExecutingAssembly();
Stream Stream_Image = ThisAssembly.GetManifestResourceStream("MyProject.Resources.info.png");
Button_Info.Image = Image.FromStream(Stream_Image);
Stream Stream_Xml = ThisAssembly.GetManifestResourceStream("MyProject.Resources.users.xml");
MyDataSet.ReadXml(Stream_Xml);
DataGridView_Report.DataSource = MyDataSet.Tables[0];
OK.
For the png i got it, but ... for the xml why does it work?
MyDataSet.ReadXml(Application.StartupPath + "\\...\\users.xml", XmlReadMode.ReadSchema));
This i understand, (not embedded although) the path way, here i really reading a xml not a stream.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
There isn't really any difference between PNG data and XML data, it's only a bunch of bytes. Reading a stream of bytes as a PNG image or reading a stream of bytes as an XML document makes no difference for the stream that you are reading from.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
There is no difference at all. When you pass a path it goes and opens the file (which ends up as a stream), and when you pass it a stream - well, its already a stream.
A stream is just a pile of data, in memory, on your hard disk, coming over a network; it's all quite similar.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Ok then i got it.
The more i know the more i realize i dont know
thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hey, i have this form that makes a grid of buttons, and when you click on the button it changes color.
The point of this is so i can do a check later and if the button is green i will turn on something.
Problem is it doesn't seem to save my settings, infact it doesn't seem to read the settings.default values after drawing
The settings look like:
Name | Type | Scope | Value
Mon0 Bool User True
Mon1 Bool User True
Mon2 Bool User False //and so forth for the next 165 options
void CreateButton()
{
List<list><button>> btns=new List<list><button>>();
string[] day = new string[] { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
int hour = 24;
string name;
for (int i = 0; i < day.Length; i++)
{
List<button> buttons = new List<button>();
for (int j = 0; j < hour; j++)
{
Button btn = new Button();
btn.Name = GenerateButtonName(day[i],j);
name = btn.Name.Substring(3);
foreach (SettingsProperty currentProperty in Properties.Settings.Default.Properties)
{
if (currentProperty.Name == name)
{
if (currentProperty.DefaultValue.Equals("True"))
{
btn.BackColor = System.Drawing.Color.Green;
}
else
{
btn.BackColor = System.Drawing.Color.LightGray;
}
}
}
btn.Location = new System.Drawing.Point(445, 130);
btn.Size = new System.Drawing.Size(14, 14);
btn.Click += new System.EventHandler(btn_Click);
buttons.Add(btn);
tableLayoutPanel1.Controls.Add(btn, j, i);
}
btns.Add(buttons);
}
}
private void btn_Click(object sender, EventArgs e)
{
string senderName;
senderName = ((System.Windows.Forms.Button)sender).Name.Substring(3);
if (((System.Windows.Forms.Button)sender).BackColor == System.Drawing.Color.Green)
{
((System.Windows.Forms.Button)sender).BackColor = System.Drawing.Color.LightGray;
foreach (SettingsProperty currentProperty in Properties.Settings.Default.Properties)
{
if (currentProperty.Name == senderName)
{
currentProperty.DefaultValue = "False";
}
}
}
else
{
((System.Windows.Forms.Button)sender).BackColor = System.Drawing.Color.Green;
foreach (SettingsProperty currentProperty in Properties.Settings.Default.Properties)
{
if (currentProperty.Name == senderName)
{
currentProperty.DefaultValue = "True";
}
}
}
}
</button></button></button></list></button></list>
I have a button on the form that calls the Properties.Settings.Default.Save().
It does draw the buttons, according to the settings, the first 3 are green, the rest are grey, but when i put in a statement that made a label equal the value of Mon0, even though the values are drawing as True and the tabel in the settings says true, its returning the value False.
Can anyone help! I'v been ripping my hair out over this for days! Let me know if you need more info or want a copy of the project.
|
|
|
|
|
The RichTextBox control's Text property displays a dropdrown option so you can enter multiple lines of entry.
I was wondering if there was a way to do this with a custom Text property. I understand it'd probably have to do with the Designer() ComponentModel option, but I don't know how to handle it.
Thanks
|
|
|
|
|
One of my articles might be able to help you: Targeting Design-Time Events of UserControls[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|