Get Form ID

  • Thread starter Thread starter Javier Ros
  • Start date Start date
J

Javier Ros

hi guys,

How to know the Form ID of a Page with C# CodeBehind?

Thanks in advance.

..Javier Ros Moreno.
 
Hi,

Do you mean this.ID ?

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
No, this.ID (Page.ID) isn´t the form ID, i want the ID of the form generated
by the server.

..Javier Ros Moreno.
 
Ugly solution but works:

string s;
for (int i = 0 ; i < this.Controls.Count; i++)
{
if (this.Controls is System.Web.UI.HtmlControls.HtmlForm)
{
s = this.Controls.ID;
break;
}
}

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Back
Top