ajax toolkit modalpopupextender problem
-
PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" OnOkScript="onOk()" Drag="true" DropShadow="true" />
hellow as i mention above a modalpopup extender i open a new panel and panel is opned and i have a button add to add new data in database but its not working and when i use debugging to check what happen then cursor is not reached that position. is it possible or not? thanks :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
-
PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" OnOkScript="onOk()" Drag="true" DropShadow="true" />
hellow as i mention above a modalpopup extender i open a new panel and panel is opned and i have a button add to add new data in database but its not working and when i use debugging to check what happen then cursor is not reached that position. is it possible or not? thanks :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
Hi! Have you tried to remove
OnOkScript="onOk()"
. I have had problems mixing OkScript on client side with the code behind button onclick handler. Also, i assume that you have a button control names btn_add which isAutoPostBack="true"
and you have a OnClicked event connected to is? otherwise, I need more information about your problem te be able to help. -
Hi! Have you tried to remove
OnOkScript="onOk()"
. I have had problems mixing OkScript on client side with the code behind button onclick handler. Also, i assume that you have a button control names btn_add which isAutoPostBack="true"
and you have a OnClicked event connected to is? otherwise, I need more information about your problem te be able to help.Thanks for reply and i am using this code:
PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" Drag="true" DropShadow="true" />
and on btn_Add_new_project click event i store values in database. but value is not stored in database as u suggest that i remove OnOkScript="onOk()" i remove but problem still there. :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
-
Thanks for reply and i am using this code:
PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" Drag="true" DropShadow="true" />
and on btn_Add_new_project click event i store values in database. but value is not stored in database as u suggest that i remove OnOkScript="onOk()" i remove but problem still there. :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
-
can you provide the btn_add control aspx code?
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn.
What you don't know. We teachthanks for reply.
when i click on this link button my popup window will be open. and when i click on btn_add code is
protected void btn_add_Click(object sender, EventArgs e)
{
DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
if (tbl_test.Rows.Count > 0)
{
Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
}
else
{
DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
DataRow row1 = tbl1.NewRow();
row1["issue_type"] = txt_issue_type.Text;
tbl1.Rows.Add(row1);
dt.update(tbl1, "select * from tbl_issue_type");
Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
//Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
//Page.RegisterStartupScript("abc", "window.close();");
}
}:-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
-
thanks for reply.
when i click on this link button my popup window will be open. and when i click on btn_add code is
protected void btn_add_Click(object sender, EventArgs e)
{
DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
if (tbl_test.Rows.Count > 0)
{
Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
}
else
{
DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
DataRow row1 = tbl1.NewRow();
row1["issue_type"] = txt_issue_type.Text;
tbl1.Rows.Add(row1);
dt.update(tbl1, "select * from tbl_issue_type");
Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
//Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
//Page.RegisterStartupScript("abc", "window.close();");
}
}:-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
-
Do you have a control that looks like this?
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn.
What you don't know. We teach -
No i don't have any button as you mention. :rose:
I will do my best? Integrated Solutions, Bikaner (Raj.), India
Ok! your have a modal poupextender:
PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" OnOkScript="onOk()" Drag="true" DropShadow="true" />
which is shown when you click on
targetcontrolid="btn_Add_new_project"
then you have:which is the button to open the modal with. this button is connected to a
onclick="btn_Add_new_project_Click"
which I know nothing about. then you have the method:protected void btn_add_Click(object sender, EventArgs e)
{
DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
if (tbl_test.Rows.Count > 0)
{
Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
}
else
{
DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
DataRow row1 = tbl1.NewRow();
row1["issue_type"] = txt_issue_type.Text;
tbl1.Rows.Add(row1);
dt.update(tbl1, "select * from tbl_issue_type");
Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
//Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
//Page.RegisterStartupScript("abc", "window.close();");
}
}which is supposed to be called by a button the has a
onclick="btn_Add_Click"
event connected. I have not seen this one either. so my question: do you want to store tha data to the database when you open your modal or when you close it? do you have a button to close it? since the button i asked for does not exist:and according to the modal popup extender, this button, or something with the same name should close the modal.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We -
Ok! your have a modal poupextender:
PopupControlID="pnl11" BackgroundCssClass="modalBackground" OkControlID="btn\_add" OnOkScript="onOk()" Drag="true" DropShadow="true" />
which is shown when you click on
targetcontrolid="btn_Add_new_project"
then you have:which is the button to open the modal with. this button is connected to a
onclick="btn_Add_new_project_Click"
which I know nothing about. then you have the method:protected void btn_add_Click(object sender, EventArgs e)
{
DataTable tbl_test = dt.filltbl("select * from tbl_issue_type where issue_type=" + "'" + txt_issue_type.Text + "'", "aa");
if (tbl_test.Rows.Count > 0)
{
Page.RegisterStartupScript("myrest", "alert('issue type already exists');");
}
else
{
DataTable tbl1 = dt.filltbl("select * from tbl_issue_type where id=-1", "new1");
DataRow row1 = tbl1.NewRow();
row1["issue_type"] = txt_issue_type.Text;
tbl1.Rows.Add(row1);
dt.update(tbl1, "select * from tbl_issue_type");
Page.RegisterStartupScript("myrest", "alert('New issue was added successfully');");
//Page.RegisterStartupScript("myqd", "window.opener.location.reload(true);");
//Page.RegisterStartupScript("abc", "window.close();");
}
}which is supposed to be called by a button the has a
onclick="btn_Add_Click"
event connected. I have not seen this one either. so my question: do you want to store tha data to the database when you open your modal or when you close it? do you have a button to close it? since the button i asked for does not exist:and according to the modal popup extender, this button, or something with the same name should close the modal.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. Wethere is a dropdown listbox having bound with database if user want new data then click a linkbutton on myform and when i click on this button a panel is open through modal popup. panel which is open through modal popup having a textbox and a button. when i click on this button i want that textbox value enter into the database and return to the form which out modal popup. means this will add a new data in database and new datafill in dropdown list box. if still you confused i will send you whole page and code i used. thanks to reply me. :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
-
there is a dropdown listbox having bound with database if user want new data then click a linkbutton on myform and when i click on this button a panel is open through modal popup. panel which is open through modal popup having a textbox and a button. when i click on this button i want that textbox value enter into the database and return to the form which out modal popup. means this will add a new data in database and new datafill in dropdown list box. if still you confused i will send you whole page and code i used. thanks to reply me. :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India