Hi all,
Here I am creating dynamic text box control and i want to fire text_changed event to this created text box. But i have query on this event,
Example i need to display HELLO when text changed so code
response.write("HELLO");
Now my query is the above line where i need to write or how i need to call the function(set of code) to fire when text_changed event fired, why because we are creating and firing this event dynamically.
Please help me..
thank you
Loading
Madhu KPosted Apr 28, 2011, 7:42 AM
satheesh babuPosted Apr 28, 2011, 7:32 AM
let me explain my situation.
I getting a value into text box(tb1) from data base and then i am checking this value with another text box(tb2) value.
if tb1!=tb2 then
{
create dynamic text box(tb3) and access the input value
}
and now compare the value with tb1 like below
if (tb1 != tb2+tb3)
{
create dynamic text box(tb4) and access the input value
}
like this sum of all other text box values = tb1 then stop creating dynamic text boxes and perform some logic in button click.
Please help me on this.
Madhu KPosted Apr 28, 2011, 7:25 AM
satheesh babuPosted Apr 28, 2011, 7:17 AM
If i have creating more than one text box control and i am checking some constraint. I am creating text box controls up to that constraint statisfies. so i don't know how many times text boxes creating so how to write the below event handler
Madhu KPosted Apr 28, 2011, 6:54 AM
tb.TextChanged += this.TextBox_TextChanged;
Then in textchanged event you write your code
protected void TextBox_TextChanged(object sender, System.EventArgs e)
{
TextBox tb = (TextBox)sender;
Response.Write("My code here");
}