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

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

HTML Viewer HIDE scrollbar
How can I disable scrollbars in a HTML Viewer control? I can't hide them. Even i have enough space b

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

quotes changing
hi all

in my content

opening quotes " changes to “

close qu

Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

duplicate record notification
In my database, after insertion of records, I want to know if the record inserted is duplicate or no

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

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