Search online and try IsPostBack property of the page.

~~~~~~~~~~~~~~~~~~~~~~~~
Harun Yiğit Legoz
[HyundaiAssan - Senior Software Developer]
[MCTS: .NET Framework 3.5, ASP.NET Applications]

[B : http://www.hylegoz.net]
[B : http://hylegoz.spaces.live.com]
[L : http://www.linkedin.com/in/hylegoz]
[F : http://www.facebook.com/hylegoz]
[T : http://twitter.com/hylegoz]

Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html>
- "I, Joan Crawford, I believe in the dollar. Everything I earn, I
spend."

On Sun, Aug 2, 2009 at 7:17 AM, MatthewZ <[email protected]> wrote:

>
> Hey guys - had a quick question.
>
> I'm designing a c# / ASP.net web app with a SQL back end.  I initially
> have my code execute a SQL statement, then set a text box to that
> value, and then have an update statement update the SQL value with the
> textbox.text value.
>
> protected void Page_Load(object sender, EventArgs e)
> {
>   textbox1.text = "Some Value";
> }
>
> private void updateSQL()
> {
>   UpdateSQL(textbox1.text);
> }
>
> I would like it to work that in my Page_Load event, it sets the inital
> value, and when I run the updateSQL() method, it takes whatever value
> is currently in the textbox, and sends it to the UpdateSQL method.
>
> However, it seems as that once I set the textbox1.text property, no
> matter what I enter in the textbox control on the webpage, the
> textbox1.text property stays to what i inially set it to ("Some
> Value").
>
> Any ideas?
>
> --Matthew
>

Reply via email to