asp.net - Can i use a single session variable to store all the field values -
i have 9 pages 10 fields in each page. can use single session variable store field(textbox,drop downlist,radiobuttons) values of 9 pages? if give me small example inorder proceed. im kind of stuck.
could you? yes. should you? not - though can't sure without understanding problem intending solve.
update 1 sample solution
ok, i'm going assume want store values controls , not controls themselves. if so, easiest solution stuff them in using meaningful token separate them. like:
session("mycontrolvaluelist") = "name='txt1',value='hello'|name='txt2', value'world'" to retrieve split them string array:
myarray = session("mycontrolvaluelist").split("|") and iterate through find control/value want.
so strictly speaking that's an answer. still question whether best answer particular scenario. unfortunately can't judge that until provide more information.
Comments
Post a Comment