Click here to Skip to main content
15,890,123 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Variables gone during grid insert command Pin
Richard MacCutchan4-Feb-15 3:03
mveRichard MacCutchan4-Feb-15 3:03 
GeneralRe: Variables gone during grid insert command Pin
byka4-Feb-15 3:15
byka4-Feb-15 3:15 
GeneralRe: Variables gone during grid insert command Pin
Richard MacCutchan4-Feb-15 3:33
mveRichard MacCutchan4-Feb-15 3:33 
GeneralRe: Variables gone during grid insert command Pin
byka4-Feb-15 3:42
byka4-Feb-15 3:42 
QuestionRe: Variables gone during grid insert command Pin
Richard MacCutchan4-Feb-15 3:52
mveRichard MacCutchan4-Feb-15 3:52 
AnswerRe: Variables gone during grid insert command Pin
byka4-Feb-15 4:15
byka4-Feb-15 4:15 
GeneralRe: Variables gone during grid insert command Pin
Richard MacCutchan4-Feb-15 4:34
mveRichard MacCutchan4-Feb-15 4:34 
GeneralRe: Variables gone during grid insert command Pin
Richard Deeming4-Feb-15 5:41
mveRichard Deeming4-Feb-15 5:41 
I'm guessing that there is a post-back between the btnLoad_Click event handler and the rgExclusions_InsertCommand event handler?

When an ASP.NET page posts back, the request is served by a new instance of the page class. Once the page has been rendered, that instance of the class is discarded, along with the value of any fields. That is why your StateTemplate field is not persisting between requests.

If you want to save the values between requests, then you'll need to store them in ViewState:
Beginner's Guide To View State [^]
Understanding ASP.NET View State[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


Questionasp.net mvc 4 razor, time to learn something new this year. Pin
jkirkerx3-Feb-15 10:56
professionaljkirkerx3-Feb-15 10:56 
AnswerWhat's do you think is the best migration path to a classic asp.net web site to a responsive design? Pin
jkirkerx3-Feb-15 12:46
professionaljkirkerx3-Feb-15 12:46 
GeneralRe: What's do you think is the best migration path to a classic asp.net web site to a responsive design? Pin
F-ES Sitecore5-Feb-15 7:40
professionalF-ES Sitecore5-Feb-15 7:40 
GeneralRe: What's do you think is the best migration path to a classic asp.net web site to a responsive design? Pin
jkirkerx5-Feb-15 9:28
professionaljkirkerx5-Feb-15 9:28 
AnswerRe: asp.net mvc 4 razor, time to learn something new this year. Pin
harsimranb7-Feb-15 7:59
harsimranb7-Feb-15 7:59 
GeneralRe: asp.net mvc 4 razor, time to learn something new this year. Pin
jkirkerx8-Feb-15 11:06
professionaljkirkerx8-Feb-15 11:06 
GeneralRe: asp.net mvc 4 razor, time to learn something new this year. Pin
harsimranb8-Feb-15 11:46
harsimranb8-Feb-15 11:46 
GeneralRe: asp.net mvc 4 razor, time to learn something new this year. Pin
jkirkerx8-Feb-15 11:54
professionaljkirkerx8-Feb-15 11:54 
AnswerRe: asp.net mvc 4 razor, time to learn something new this year. Pin
Erik Funkenbusch7-Feb-15 15:15
Erik Funkenbusch7-Feb-15 15:15 
GeneralRe: asp.net mvc 4 razor, time to learn something new this year. Pin
jkirkerx8-Feb-15 11:01
professionaljkirkerx8-Feb-15 11:01 
QuestionHow to convert .vox file format to mp3 format Pin
PR_Chauhan2-Feb-15 20:00
PR_Chauhan2-Feb-15 20:00 
AnswerRe: How to convert .vox file format to mp3 format Pin
Richard MacCutchan2-Feb-15 23:43
mveRichard MacCutchan2-Feb-15 23:43 
GeneralRe: How to convert .vox file format to mp3 format Pin
PR_Chauhan10-Feb-15 3:23
PR_Chauhan10-Feb-15 3:23 
QuestionCount the alphabet and Numeric from a string Pin
Sujith Karivelil31-Jan-15 1:28
professionalSujith Karivelil31-Jan-15 1:28 
AnswerRe: Count the alphabet and Numeric from a string Pin
Peter Leow31-Jan-15 2:35
professionalPeter Leow31-Jan-15 2:35 
AnswerRe: Count the alphabet and Numeric from a string Pin
Anurag Gandhi31-Jan-15 23:25
professionalAnurag Gandhi31-Jan-15 23:25 
Questionforum Pin
Member 1140791030-Jan-15 19:24
Member 1140791030-Jan-15 19:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.