|
Thanks guys for replying back. I have made some changes to my orginal post.
Basically, you guys are suggesting me to apply the zoom to the right side control only.
The problem is that the right side Control that is being displayed is a referenced object and if a change is made to it reflects back to the corrosponding control that is shown in the listbox.
I am carring on my previous example, let's say from the listbox control2 is selected has an element (a button with Size 100,100 and Location 0,200) and that is also shown. If zoom is applied to 75% the Size and Location are now reflected to 75%. So the control2 elements on the right side, its size becomes (75,75) and location (0,75).
Since we orignally had a reference to the Control2 object if a change is made through the right side it also reflect back in the listbox.
modified on Wednesday, February 25, 2009 2:11 PM
|
|
|
|
|
Hi,
I have a button on my webform that I need to access from my user control code behind, not the page on which the button resides, but I'm not sure how I find it.
I've thought it would be something like this, but this doesnt work:
Button button=(Button)FindControl("btn");
Thanks!
|
|
|
|
|
Have you tried Page.FindControl("..") ?
|
|
|
|
|
Yes have tried that:
Button button=(Button)Page.FindControl("btn");
The Page will return the correct page, but nothing gets assigned to button, so I am getting nullReferenceException error.
|
|
|
|
|
When I drill down into the error, into the Page property, the Page directs itself correctly and the button is listed under the [ASP.Page_aspx] base but there is no FindControl option listed. Any ideas as to why this is?
|
|
|
|
|
I hope that Button is not in the ContentPlaceHolder and you are not using MasterPages.
Try
Page.Parent.FindControl()
If that button is inside the ContentPlaceHolder then stack trace and find the actual value for that button. something like xxxxxctl001_btn.
then first find the content place holder (or any other container)
using
container c = Page.FindControl('container') and then c.FindControl('btn')
PS: container means any container i.e. Panel / ContentPlaceHolder etc...
|
|
|
|
|
Yes! That was my problem. I was not referencing the Master Page and ContentPlaceHolder. Thank you for pointing that out to me.
|
|
|
|
|
Hello can anyone tell me how to make the date time picker control in visual studio 2005 to display only a list of months and years?
|
|
|
|
|
It can't, as far as I know.
|
|
|
|
|
Tought so, Thank you anyways.
|
|
|
|
|
Hi
I am designing an XSD schema in which there is a field called SSN. This field has some restrictions like maxlength, type, format etc. All that is described in schema itself. Schema sample attached.
Now, I generate a C# class out of this schema using XSD.exe or XSDGen tool. They do create a class but none of them incorporates the restrictions (validation) specified in schema. Basically, I want object class to have a way to validate those restrictions.
How can I generate a class from schema which also includes the restriction on fields?
Thanks
Pankaj
Here is the schema sample ---
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpletype name="ssnumber" final="restriction">
<xsd:restriction base="xsd:string">
<xsd:length value="11" />
<xsd:pattern value="\d{3}\-\d{2}\-\d{4}" />
</xsd:restriction>
</xsd:simpletype>
<xsd:element name="Employee">
<xsd:complextype>
<xsd:sequence>
<xsd:element name="SSN" type="ssnumber" />
<xsd:element name="Name" type="xsd:string" />
</xsd:sequence>
</xsd:complextype>
</xsd:element>
</xsd:schema>
|
|
|
|
|
Hi
I have list of files which are roughly 2GB in Size. When I load them they never comes back, So I need to split them, I searched and found this one
http://www.codeproject.com/KB/XML/SplitLargeXMLintoSmallFil.aspx[^]
but it has some missing declarations and functions which I asked the writer but no response so far.
Is there any oen who can help me out with this issue. I need to split one file into maximum of 25 MB size. The xml File is very very simple like this
<catalog>
<product>
<name>Product 1</name>
</product>
<product>
<name>Product 2</name>
</product>
</catalog>
any help would be highly appreciated.
Best Regards
Rizwan Bashir
|
|
|
|
|
Any way you like. Are your products in different departments? Or come from different vendors?
|
|
|
|
|
They are from Different vendors but most of them have same XML structure with same parent tags ie catalog and product. under product there could be different number of values but overall structure is same.
any ideas ?
Best regards
Rizwan Bashir
|
|
|
|
|
I was hinting that you could make separate files for each department or vendor.
|
|
|
|
|
hi friends..am stroing graphics..for example rectangle,ellipse,line,round rect etc each graphic in seperate object..so now i want to make invisble/visble using button click events..plzzzzzzzz help me...
txs in advance...
|
|
|
|
|
I wrote a simple code for help
Bitmap b1 = new Bitmap(256, 256);
Bitmap b2 = new Bitmap(256, 256);
Bitmap final = new Bitmap(256, 256);
Graphics g = Graphics.FromImage(b1);
g.DrawRectangle(Pens.Red, 0, 0, 150, 150);
g.Dispose();
g = Graphics.FromImage(b2);
g.DrawEllipse(Pens.Black, 100, 100, 50, 50);
g.Dispose();
g = Graphics.FromImage(final);
g.DrawImage(b1, new Point(0, 0));
g.DrawImage(b2, new Point(0, 0));
g.Dispose();
pictureBox1.BackgroundImage = final;
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I am trying to create a tool using c# which hides and locks folders similar to LockBox. This means that the hidden folder will be invisible to EVERYONE when protected, and visible when a password is entered. In code project there is an example using windows shell folders which actually "locks" the folder - but the problem is that it still is 1) Visible and 2) accessable through windows command prompt.
Thanks a lot
|
|
|
|
|
Ok. I didn't see one question there.
|
|
|
|
|
He's just bragging. : )
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
|
Ups ... you're right... I was just last in thinking lol..
So the question is. Is there anyway to do this in C# without using the mentioned methods above in my first post?
|
|
|
|
|
Hello sir,
your question is interesting ....
Even iam trying with similar stuff...If your succeeded in doing this, please help me out.
Thankyou sir
|
|
|
|
|
I have a boolean value in a dataset bound to a checkbox control
If the user clicks on the checkbox I want to loop through the dataset and set the boolean to false for all other rows. In other words only one of the rows in the dataset/databinding can have the boolean field set to true.
How can I achieve this please?
I had thought to use something like:
foreach (DebtorDataSet.GuarantorRow grow in DebtorDataSet.Guarantor.Rows)
{
test this row against the current databinding.position/current somehow and set the boolean for this row accordingly
}
Not sure how to actually implement it though
|
|
|
|
|
DataSet never have Rows... what is DebtorDataSet.GuarantorRow ?? are you using 3rd party controls ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|