sean.kinley-techfringe
-
3/26/2010 9:55:52 AM
RE:Regular Expression
Thank you for your response. As you suggest, I will just code it myself in .NET.
But, so to clarify what I was asking...
Let's say I have a web part WebPartA which contains a label lblField1 and a textbox txtField1
In CMSManager > Development > WebParts > MyWebParts > WebPartA > Properties I've created an attribute called lblField1 to control the label name. For example, I call to this using:
lblField1.Text = (string)PartInstance.GetValue("lblField1");
I also created an attribute called txtField1 and was assigned a regular expression contstraint to it. But, it looks like this only applies to when I use the confiruation pop up in CMSDesk > Design for that web part. I was hoping I could also call to it using .NET...something like...
txtField1.ValidationExpression = (string)PartInstance.GetValue("txtField1.RegularExpession");
but I don't know if there's a method for this.
I can, of course, just create my own attribute to handle this part to, but it seems redundant if you already have the field value there. It might make more sense to do it as it's own attribute text value any, since I don't think there's a way to edit the regular expression using CMSDesk > Design > Web Part Config.
Anyway, not a big deal, I've already coded it manually.
|