Here are a few ways to get the value of an asp textbox
- document.getElementById(‘<%=Test.ClientID%>’).value
- <%=txtMyTextBox.ClientID%>
- Response.Redirect(“Form2.aspx?name=” + txtName.Text + “&num=” + txtStNum.Text );
Pex automatically generates test from Visual Studio code editor. It tries interesting sets of input and output of a method. This provide a high level of test coverage automatically. Currently it is a Visual Studio add in for testing .NET Framework Applications
Moles supports Unit Testing by isolation with detours and stubs.
http://research.microsoft.com/en-us/projects/pex/
You can try it out online with no install at: http://www.pexforfun.com/