asp.net - How to set session variable for Eval values for multiple record in database -


< asp:lable runat="server" id="emailid" text='<%#eval("email") %>' height="20px"  width="150px" borderstyle="none" font-bold="true"></asp:label>  <%# session["session_taskcode"] = databinder.eval(container.dataitem, "email")%> 

i getting value of email through session["session_taskcode"] variable in .cs file. problem have multiple records in gridview. so, when wanted values email particular records, session["session_taskcode"] variable takes values of email of last record only.

so, how should take values of email different records in session variable?

hi use rowdatabound event of grid take emails. can use list store emails. ad list session.

//global declaration list<string> emaillist= new list<string>; //rowdatabound event label lblemail= e.finfcontrol("lblemail") lable; emaillist.add(lblemail.text); session["email"]=emaillist; 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -