C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




array values not retained back to c sharp from javascript


Posted Date: 14 Feb 2007      Total Responses: 1

Posted By: srilekha       Member Level: Bronze     Points: 2


hi i m coding in c sharp serverside where i declare an array and store some set of values in it.

Then i call a javascript function on a button click event.
But after that when i return back to the server side code the values in the array are null in the server side code. Im not able to retain any values in array or any othe variable in the server side.

Pls suggest a way to retain the array value in the server side after passing through the javascript function in client side.

Please reply very urgent.




Responses

Author: Ali Adravi    14 Feb 2007Member Level: SilverRating:     Points: 2
Hi!
When the page is posted back each and every value of variables vanished, its not only in the case of array but you can't retain value of any kind of variable, controls on the page maintain viewstate, when the page posted back it again fill its previous values from the viewstate.
So, if you want to retain any value in variables the there are different methods to store the values in some where and when the page posted back read these values. fou your help: your can put these values in any of the following storage mechanism:
viewstate
cookies
querystring
session
cache
application
etc.
hope it will help you.
ALI


Post Reply
You must Sign In to post a response.
Next : Search button
Previous : Regarding XML
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use