Frame help in VB

Is there way to keep the value of an object in a frame on a form in Visual Basic after choosing an action?

txtSize.Text resets to “” after hitting the submit button.

Are you talking about VB or ASP? Your problem sounds more like its a problem with asp.

If you do mean VB, then within the SubmitButton_Click() event, you can set a global variable equal to the txt.Text value. Then go on with whatever action happens within the Submit button (though i don’t know why it would clear out the textbox), and then set txt.Text = globalVariable
If you mean ASP, it sounds like you are submitting a form back to itself. (like, within the FORM tag on ASPpage.asp you have ACTION=ASPPage.asp)
Once a form is submitted, the asp page is essentially remade, so it doesn’t remember any of the values that you had on the page. The easiest (though perhaps not the best) way to do this is to check the Request Variables in ASP:



in the <HEAD> you should have something like this:

<SCRIPT LANGUAGE="JavaScript">
!--
function submitMe(){

//do whatever you need to here to validate the info in the form

frmForm.submit();

};

//-->
</SCRIPT>

the form should like something like this:

<FORM NAME=frmForm ACTION=ASPPage.asp METHOD=POST>

<BUTTON ID=butSubmit onClick="submitMe();">

<%if isEmpty(Request.Form("txtX")) then%>
<INPUT ID=txtX NAME=txtX>
<%else%>
<INPUT ID=txtX NAME=txtX VALUE='<%=Request.Form("txtX")%>'>
<%end if%>
</FORM>