Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to add a HTML Form Web Part to a SharePoint 2010 page programmatically in a feature receiver, but I can't find the class to instantiate.

share|improve this question
add comment

1 Answer 1

It's Microsoft.SharePoint.WebPartPages.SimpleFormWebPart

You'll also need to embed this somehow:

  <sfwp:Content xmlns:sfwp="http://schemas.microsoft.com/WebPart/v2/SimpleForm">

<![CDATA[<div onkeydown="javascript:if (event.keyCode == 13) _SFSUBMIT_"><input type="text" name="T1"/><input type="button" value="Go" onclick="javascript:_SFSUBMIT_"/></div>]]></sfwp:Content>
share|improve this answer
    
I do i get the value of T1? In an alert or something As i want to make sure my params date are correct. Chhers –  naijacoder Mar 6 '12 at 6:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.