On SharePoint application page I am using placeholder in like this:

<input type="text" id="name" name="name" placeholder="your name" />

But placeholder is underlined and says: Validation (XHTML 1.0 transitional) Attribute placeholder is not a valid attribute. But when i put runat = "server", error goes away

<input type="text" id="name" name="name" placeholder="your name" runat="server" /> 

Now, its valid attribute. I could not understand why placeholder attribute is not valid without runat = "server". Can anybody tell the reason? I did not want to use runat = "server".

I have also added <!DOCTYPE html>at top of the application page (i have also added <!DOCTYPE html> in my custom master page), but still it gives same error

I am using SP2010 and VS2010. I got following runtime error:

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".

Note: When i put runat="server" in tags, then above error goes away and my page runs as expected.

2 Answers 2


My guess is that you are using SharePoint Designer 2010 to edit your masterpage. If so, note that SharePoint Designer does not understand any HTML5 including the placeholder attribute of the HTML input element.

However, it works as expected if you save your page and run it in a Web browser which understands HTML5 and in particular the input placeholder attribute.

As far as I know all current Web browsers recognize that attribute, only older Web browsers like Internet Explorer 7/8/9 and Firefox 3.0/3.5 don't display it.

Update: If you are using Visual Studio it might fail in the same way because Visual Studio 2010 does not support any HTML5 attributes. The solution is the same. Just ignore the error message and go ahead with the masterpage. It will work, without the runat=server on any Webbrowser which supports HTML5.

UPDATE 2: Please follow the advise and turn detailed error messages on. Once done, please update your post with the actual error message.

  • No, i am not using Designer to edit my master page. I have added custom master page to my application by adding it as module.
    – SPBeginer
    Jan 13, 2013 at 13:37
  • See my updated answer.
    – Sig Weber
    Jan 13, 2013 at 13:46
  • I could not ignore error, because when i deploy solution, it gives runtime error.
    – SPBeginer
    Jan 13, 2013 at 14:07
  • Please update your original post with the detailed error message and which version of SharePoint and Visual Studio you are using.
    – Sig Weber
    Jan 13, 2013 at 14:22

The problem is that the html form with method=post in sharepoint application page do not return input values to the header, if we do use runat = server attribute. Now if we use runat=server and want to access input values, we can do like this:

value = Request.Form[name.UniqueID]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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