Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
48619 Points
7957 Posts
MVP
Nov 24, 2010 12:24 PM|LINK
/** And if he opens 2 browsers with same action, but with different ID ?? */ Then Y Donot U understand 2 thigs? 1 } When Click event Ocurs then Sesion Is Going to Clear Example Controller Action method() String strvalue = Convert.toString(Session["Avinash"]); ===perform Some DatabAse Wordk=================== Clear Session 2 } U can Create A Dynamic Session NBame Example in view Session Name WouldSome Thing Like This HiddenFile value with Some Dynmaic Genrated Numbner Session["Avinash" + Dynamic_GenratedNumber] = Model.Id Know Will retive it Will string strvalue = Convert.TosTring(Session["Avinash + formcollection["DynamicGenretdNumber"]])
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: How to get rid of hidden fields in ASP.net MVC 2
Nov 24, 2010 12:24 PM|LINK
/**
And if he opens 2 browsers with same action, but with different ID ??
*/
Then Y Donot U understand 2 thigs?
1 } When Click event Ocurs then Sesion Is Going to Clear
Example
Controller
Action method()
String strvalue = Convert.toString(Session["Avinash"]);
===perform Some DatabAse Wordk===================
Clear Session
2 } U can Create A Dynamic Session NBame
Example
in view Session Name WouldSome Thing Like This
HiddenFile value with Some Dynmaic Genrated Numbner
Session["Avinash" + Dynamic_GenratedNumber] = Model.Id
Know Will retive it Will
string strvalue = Convert.TosTring(Session["Avinash + formcollection["DynamicGenretdNumber"]])
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.