Majid Basirati
Majid Basirati

Reputation: 2855

change the ContentPlaceHolder's ID

I have a master page. in this master page I have a content place holder with id="ContentPlaceHolder1" I changed this to id="main-content" then change the ContentPlaceHolderID of any content page that created with this master page but I have an error:

'main-content' is not a valid identifier.

what should I do?

Upvotes: 4

Views: 559

Answers (1)

syed mohsin
syed mohsin

Reputation: 2938

You can not use "-" in your ID. you can use

main_content

or

maincontent

Upvotes: 6

Related Questions