T
TS
I am trying to create a page template. I am trying to set the value of a
field to the return value from a method. What do I have to do to get m_form
set to the value returned from a method? (the compiler won't let me do
this
// Form in the page
public HtmlForm m_form = FindFormTag();
public HtmlForm FindFormTag()
{
foreach(Control c in this.Controls)
{if(c.GetType() == typeof(HtmlForm))
{
return (HtmlForm) c;
}
}
return new HtmlForm();
}
thanks for the response.
field to the return value from a method. What do I have to do to get m_form
set to the value returned from a method? (the compiler won't let me do
this

// Form in the page
public HtmlForm m_form = FindFormTag();
public HtmlForm FindFormTag()
{
foreach(Control c in this.Controls)
{if(c.GetType() == typeof(HtmlForm))
{
return (HtmlForm) c;
}
}
return new HtmlForm();
}
thanks for the response.