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

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

Checking if variable is 0 as opposed to NULL/Empty...
I'm trying to write some code that will retrieve a user's access level from my database and if it do

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

Please help with code for SMTP authenticated PHP email form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

close site for maintenance
i get a tutorial, saying the following code can put our site offline, and only the developer can vie

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

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