Hello,
I'm working on developing a custom SmartForm Control that gets the IP address and domain name of the user accessing the SmartForm. I've developed the code to get this data in C#, however I can't get the control to work properly. After initial testing I've determined the issue is the code won't set the control property "value" from the C# code. Does anyone know how to do this? I've been looking around online and at the sourcecode of the controls here in the K2 Market but am having no luck.
At the moment I've tried the following, in my .cs file:
public string Value
{
get { return this.Attributesr"value"]; }
set { this.Attributesr"value"] = value; }
}
...
protected override void CreateChildControls()
{
Value = GetIPAddress();
}
and
protected override void CreateChildControls()
{
this.Attributes.Add("value", GetIPAddress());
}
Any ideas? The basic goal of the control is to generate a value in C# and store it in a SmartForm Control property so the SmartForm can use it.
Thanks,
~Chris