singerdave2001 Posted November 7, 2008 Posted November 7, 2008 This may seem a lil strange but the problem I am having is: I am using a placeholder and adding button controls to it with vb code. each of the submit buttons is assigned an integer value that defines the next set of button controls to be displayed on the page. I used addhandler to assign a sub to the click event this sub was responsible for clearing out the placeholder and adding a new set of buttons it seems to fire the sub but because this sub occurs late in the page load the buttons do not get drawn. finally in my desperation I started assigning the integer value to a textbox with the onclick event client side with java script shown here btnAnswerButton.Attributes("onclick") = "javascript(txtCurrentQuestion.value=0);" this actually works because I can call my sub in page_load and pass the txtcurrentquestion.value and all is well.. but now people tell me that by changing textbox values client side I interfere with ViewState and I am making the universe unstable. Does anyone have an alternative or can anyone tell me that the universe is not in peril? Quote
John_0025 Posted November 7, 2008 Posted November 7, 2008 but now people tell me that by changing textbox values client side I interfere with ViewState and I am making the universe unstable. Not true. Changing the value in a textbox has no affect on the viewstate. This may seem a lil strange but the problem I am having is: I am using a placeholder and adding button controls to it with vb code. each of the submit buttons is assigned an integer value that defines the next set of button controls to be displayed on the page. I used addhandler to assign a sub to the click event this sub was responsible for clearing out the placeholder and adding a new set of buttons it seems to fire the sub but because this sub occurs late in the page load the buttons do not get drawn. As long as the sub is called before the page renders the new buttons will be drawn. Can you show your code? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.