|
I am not that familar with the XMLCacheComm object, so I am not sure what the Count property refers to. So I am not sure why the count would be 1 or 2.
Ben
|
|
|
|
|
Thanks Ben.I was assigning application variable at the initialization part.when i assigned it in section where i want actually, i am getting the value.Any way thanks for your replies.
Expecting a positive replies in future
Thanks
Regards
DilipRam
|
|
|
|
|
Hi,
I have a web page C#, written and working.
I now need to see and validate certain controls on my page beginning with 'dt'.
In VS2005 i can happily type ...
foreach (Control ctrl in MyPage.Controls ) and it would list them and then I can use them
This doesn't work in VS2003. Any suggestions welcome?
|
|
|
|
|
My guess would be that you don't have a page called MyPage in VS2003.
Ben
|
|
|
|
|
kubben wrote: My guess would be that you don't have a page called MyPage in VS2003
|
|
|
|
|
If this was meant to be helpful, you are an idiot.
I've got it now though......
foreach (Control c in Page.FindControl("MyPage").Controls)
Cheers
|
|
|
|
|
Sorry I offended you. I guess I should leave being funny up to others. I just thought something looked wrong with the MyPage.Controls. Glad you figured it out.
Ben
|
|
|
|
|
Hello Everyone,
Does c# uses it's own predefined keywords for input and output if yes plz let me know
Thnx in advance
|
|
|
|
|
The Knowledge wrote: Does c# uses it's own predefined keywords for input and output if yes plz let me know
Input/output to/from where?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
no, the C# (or C or C++ or Java) language does not have special keywords for input/
output. They rely on classes to do your I/O. See for instance SerialPort, Graphics,
File (and all the stream stuff) etc.
|
|
|
|
|
Luc Pattyn wrote: They rely on classes to do your I/O. See for instance SerialPort, Graphics,
File (and all the stream stuff) etc.
Aahh..... Was that what he meant?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Yes, I hope he was refering to such things as the good old IN and OUT statements in Basic
(and the corresponding assembly instructions available on several microprocessors).
|
|
|
|
|
Hi,
I'm writing an MDI application and want to change the default systemcolors assigned to my titlebars. Does anyone know of a way of doing this?
Thanks in advance!
Standards are great! Everybody should have one!
|
|
|
|
|
|
Thanks for the reply, but the article only provides a panel and a progressbar. Although they're really nice, what I'm looking for is to change the colors in the title bar of my child windows: In Window's classic theme they're set to the colors defined in the selected theme (blue and lightblue by default).
Standards are great! Everybody should have one!
|
|
|
|
|
Hi everybody,
I Had used the below code to adding the textbox contorl dynamically and nodes in the treeview but i have no idea to how to remove the created control by using the control name onbutton click and also i have to remove the corresponding nodes in the treeview.any suggestion?
int n = 25;
int m = 1;
private void BtnAddControl_Click(object sender, EventArgs e)
{
TextBox txtBox = new TextBox();
txtBox.Text = "TextBox" + m;
txtBox.TabIndex=m;
txtBox.Tag=m;
txtBox.Location = new System.Drawing.Point(10, n);
txtBox.Size = new System.Drawing.Size(70, 20);
txtBox.Name = "TextBox" + m;
txtBox.Click +=new EventHandler(txtBox_Click);
this.Controls.Add(txtBox);
TreeNode root = null;
if (TV.Nodes.Count == 0)
{
root = new TreeNode("TextBox");
root.Nodes.Add(txtBox.Name);
TV.Nodes.Add(root);
}
else
{
TV.Nodes[0].Nodes.Add(txtBox.Name);
}
TV.ExpandAll();
n = n + 20;
m++;
}
Regards
Kanna
|
|
|
|
|
Hello,
You have to iterate over the Controls Collection and compare the Name property
foreach(Control c in this.Controls)
{
if(c.Name.Equals("TextBox"+m.ToString()))
{
this.Controls.Remove(c);
break;
}
}
All the best,
Martin
|
|
|
|
|
if c is the control to remove (maybe found as sender of some event), you should be
able to remove it most easily with c.Parent.Controls.Remove(c);
if you dont now c, you must iterate over it's parents controls to identify it, unless
you have setup a Hashtable/Dictionary to link the name to the Control...
|
|
|
|
|
Luc Pattyn wrote: if c is the control to remove (maybe found as sender of some event), you should be
able to remove it most easily with c.Parent.Controls.Remove(c);
if you dont now c, you must iterate over it's parents controls to identify it.
Was this info really for me?
All the best,
Martin
|
|
|
|
|
I should have replied to the original poster, my mistake, but the info is valid
for you as well.
|
|
|
|
|
Hi Martin.
I don't have VS installed on this computer, so I haven't had the time to check, but doesn't adding and removing of elements in a collection that you're currently iterating over in a foreach, throw an exception?
Martin# wrote: Hello,
You have to iterate over the Controls Collection and compare the Name property
foreach(Control c in this.Controls)
{
if(c.Name.Equals("TextBox"+m.ToString()))
{
this.Controls.Remove(c);
break;
}
}
Best regards.
-Larantz-
|
|
|
|
|
Hello,
That would be correct if you are searching for more than one control in the collection. Than you would have to add the Controls in a temporary List, like ArrayList, and remove it later while iterationg over that temp list.
In my example I was only searching for one control and stoped the foreach with a "break".
So I think this will run just fine!
But it was correct to inform about this issue, so thanks!
All the best,
Martin
|
|
|
|
|
Hi Thanks,
Its Working fine..
Regards
Kanna..
|
|
|
|
|
You are wellcome!
All the best,
Martin
|
|
|
|
|
I want to be able to rate images with stars like in Photo Gallery and Photoshop. I can not find where the rating is stored (IPTC or EXIF or ...?) Is there anybody who has an example of setting and getting the rating?
|
|
|
|