I have multiple textboxs which are created dynamically in page_load.
TextBox tb = new TextBox();
tb.id = "ID1";
tb.text = GetfromDB();
tb.TextChanged +=new EventHandler(tb_TextChanged);

Now i want to add a javascript confirmbox as
tb.Attributes.Add("onchange","javascript:return confirm('Data has Changed. Click OK To Continue');");

If the user clicks ok then continue to tb_TextChanged function and if user clicks cancel i want to restore the previous value of textbox.
How can i write the javascript function?

Thanks

u have to find the function to get the return value of that OK button..i will check and post soon

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.