开发者

what problems can occur styling if div tags, are replaced by asp.panels (in c# code)

what problems can occur styling if div tags, are replaced by asp.panels (in c# code)

i have a sample code which uses pure html,

the css styles are mapped using the ids of the divs.

i would like to replace these divs by panels using c#, yes i will keep the ids same as that in css file.

question

should i 开发者_JAVA技巧expect any problems in styling because of hidden problems, or hidden styles, or default style of asp panels?


If you are developing on .NET framework 4.0 you can set ClientIdMode property to static, so asp.net don't change your Ids.

Otherwise div ids will be affected by the container's id.

Answer

There won't be any problems if you set ClientIdMode to static.


An asp.panel is rendered as a div. Once you convert it, what's rendered should be exactly the raw HTML you have now.

So if you keep the ids the same you shouldn't have any problems.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜