Very strange problem

G

Guest

Hi,

I'm using the below code to search and populate the textboxes in my web
form (form1) with some data.
where I have a search button & a textbox to enter the searched text.
if "businessNoTextBox" is empty and click the search button a second form
(form2)will be called wich have all available records. select a record from
the second form (form2) will be closed and the information will be passed to
my first form (form1) and populate all textboxes including
"businessNoTextBox".
BUT, if I clear the businessNoTextBox and try another search the Debugger
is telling me that "businessNoTextBox" still have the previous value!!!
however I clear the "businessNoTextBox" the debugger still telling me that
businessNoTextBox.Text is NOT empty!?

protected void searchBusinessButton_Click(object sender, EventArgs e)
{
if (businessNoTextBox.Text.Trim() == "")
{
if
(!this.Page.ClientScript.IsStartupScriptRegistered(this.GetType(),
"GetEvaluation"))
{
StringBuilder sb = new StringBuilder();
sb.Append("<script>");

sb.Append("window.open('../../Search/SearchRegister.aspx',document.form1.evaluationIDTextBox.value,'left=50,
top=10, height=650, width= 950, status=yes, resizable= no, scrollbars= yes,
toolbar= no,location= no, menubar= no')");
sb.Append("</script>");
this.Page.ClientScript.RegisterStartupScript(this.GetType(),
"GetEvaluation", sb.ToString());
}
return;
}
else
{
//open database and populate textboxes in my form (form1)
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top