The global variable doesn't keep its value

后端 未结 2 1254
感情败类
感情败类 2020-12-20 08:03

The problem is , every time i do a postback my variable \"value\" doesn\'t keep it\'s previous value, and always the dictionary is empty. It doesn\'t have any previous saved

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-20 08:40

    After postbacks the variables lose the value as they are recreated..You can depend HTML hidden inputs..

    Markup:

    
    

    Code behind:

    Hidden1.value="something";
    

提交回复
热议问题