Asp net Programmatically meta name =viewport

Below is a meta tag on an aspx page:

<meta name="viewport" content="width=700; initial-scale= 1.3; maximum-scale=5.0; user-scalable=1;"/>

I want to change the width and initial-scale in my code behind using VB in asp net.

Can you please tell me the code to change the initial-scale in VB, also how to change the width.


Who is Participating?
Miguel OzSoftware EngineerCommented:
One way is to generate the meta always in code behind as shown below:
Page.Header.Controls.Add(new LiteralControl(@"<meta ...your values come here ... />"))

Open in new window

Other alternatives using header placeholders are shown here
williecgAuthor Commented:
Just what I need. works great
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.