How to assign JS screen.width to ASP.Net variable


Posted on 16th Feb 2014 07:03 pm by admin

I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to change it so that it gets the width using Javascript, in case the users don't have cookies enabled. I need something like: Dim myWidth As String = ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType, "screenwidth", "screen.width;", True) However, I get a blue line under this and it tells me that it doesn't produce a value How can I do this?
No comments posted yet

Your Answer:

Login to answer
256 Like 33 Dislike
Previous forums Next forums
Other forums

Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont re

Inter Company -- Resources Related Billing (Services Industry)
Hello,

My company has a scenario where:
Company A bills Company C for INTER (cross

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

is this the proper use of mysql_real_escape_string() to prevent sql injections?
i was wondering is this the proper use of mysql_real_escape_string() to prevent sql injections? any

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

links using header()
Hi All

I'm not sure where to ask for help on this but I hope someone can offer some. I'm at

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash