73
rated 0 times
[
75]
[
2]
/ answers: 1 / hits: 23098
/ 13 Years ago, tue, january 3, 2012, 12:00:00
my client side code button1.Attributes.Add(onclick, javascript:window.open('page1.aspx?CheckedItem= + checkedItem.ToString() + ','mywindow',');); is not executing on the first click.But it is working fine from second click onwards.I wrote this code inside the button click event.
I had tried to put this inside the page_load ,but the problem is i need to return a value from this page.
here is the code
protected void btnPreview_Click(object sender, EventArgs e)
{
//StringBuilder checkedItem = new StringBuilder();
checkedItem.Length = 0;
foreach (ListItem i in chkValidation.Items)
{
if (i.Selected)
{
if (string.IsNullOrEmpty(Convert.ToString(checkedItem)))
{
checkedItem.AppendFormat(i.Text);
}
else
{
checkedItem.AppendFormat(,);
checkedItem.AppendFormat(i.Text);
}
}
btn_Preview.Attributes.Add(onclick,
javascript:window.open('TimePhaseAttributePreview.aspx?CheckedItem= +
checkedItem.ToString() + ','mywindow','menubar=0,resizable=0,width=350,height=250'););
}
Please help me
More From » c#