How to use document.getElementById(StgElementName) in C#

dipster307
dipster307 used Ask the Experts™
on
How do use "document.getElementById(StgElementName)" in C#, I tried the following but not working.

                        HtmlGenericControl myControl1 = (HtmlGenericControl)FindControl(StgElementName);
                        myControl1.InnerText = stgElementContent;
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Architect - Coder - Mentor
Commented:
Hi,
StgElementName is the elementId as it is defined in the markup? If not, you should use the element id instead.

Author

Commented:
Thanks Eduard, school boy error, I realised I wasn't passing the elementID, kicking myself I didn't see that.
Eduard GherguArchitect - Coder - Mentor

Commented:
Hi! My pleasure! If you need more help, please, let me know.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial