Hi,
I want to add a functionality to the button onclick. When I click on the button, I want to open a new aspx page in a new window and pass a parameter in the querystring.
Firstly, I tried using response.redirect
Response.Write(
"<script>window.open(a.aspx?GTIN=" +gtin.Text+ "');</script>");
It works, it opens a new window, but something happens to my previous window after the second window loads. The css becomes not used. (at the begin the css loads, but after I click the button, it seems like css is not been used in my previous page).. Any ideas why the css file is not been active when I click on the button.
Than, I tried, to add an attribute to the button:
string command = "window.open(a.aspx?GTIN=" + gtin.Text.Trim() + "');";
this.bt_image.Attributes.Add("onclick", command);
and it loads only when I click the second time on the button. First time I click the button, nothing happens.. second time it opens.. Why is that?
Please let me know what am I missing?
Thank you
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).