Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 29, 2009 09:11 AM by mudassarkhan
Member
38 Points
19 Posts
May 22, 2009 06:25 AM|LINK
for this issue you can use querystring or session also both will work if using query string need to write a
button.Attributes[
Otherwise you can use Session.
Dont forget to click "Mark as Answer" on the post that helped you.
Participant
1182 Points
1697 Posts
May 22, 2009 06:29 AM|LINK
btnOrg.OnClientClick = "window.open('Organization.aspx','mywindow','width=700,height=600')";
this is my code on Page_Load()
bt its blocked by popup blocker.
so what should I d, so that no popupblocker can block it....
cos i can only allow popup on my machine...bt cant on web.
so pls tell me...how..?
All-Star
78956 Points
13402 Posts
MVP
May 22, 2009 06:34 AM|LINK
If user opens a popup on button or link click it will never be blocked But if you open it directly from your website it will be blocked and nothing can be done for that
May 22, 2009 06:43 AM|LINK
is there any other way.. to open a seperate user defined sized .aspx page on a button click..
thanx for quick reply..
May 22, 2009 06:49 AM|LINK
"If user opens a popup on button or link click it will never be blocked"
What did u mean this...?
May 22, 2009 06:55 AM|LINK
But if you open on button click it won't be blocked
That's the only way to do it You can have a look at this
http://www.aspsnippets.com/post/2009/05/07/Modal-PopUp-using-JavaScript.aspx
Its the same way but it blocks the backgroud
May 22, 2009 07:24 AM|LINK
this is my child page code...where i have bounded radiobuttonlist
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { Response.Redirect("addContacts.aspx?id="+RadioButtonList1.SelectedItem.Text); }
and this is parent page code where i have to fill values...
on addContacts.aspx
txtOrgnization.Text = Request.QueryString["id"].ToString();
so where i have to put this so that after selecting an option in child page automatically fill the parent page's textbox(txtOrgnization)
help me pls...
May 22, 2009 07:33 AM|LINK
Means on button click
240 Points
64 Posts
May 22, 2009 08:16 AM|LINK
Hi,
You can try modal popup extender from ajax toolkit.
May 22, 2009 08:28 AM|LINK
This is my parent page's code
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (txtOrgnization.Text == null) { txtOrgnization.Text = Request.QueryString["id"].ToString(); } else { }
} btnOrg.OnClientClick = "window.open('Organization.aspx','mywindow','width=700,height=600')";
and the child page as
on Page_Load
protected void Bind_Organization() { string strSql = "select OrgId,OrgnizationName from mtblOrgnization where OrgnizationName like 'W%'"; DataTable dt = new DataTable(); dt = myCls.My_Datatable(strSql); if (dt.Rows.Count > 0) { RadioButtonList1.DataSource = dt; RadioButtonList1.DataBind(); } }
// Selecting an organization
but now the problem is niether this value fill txtOrgnization
and sfter selecting an option on radiobutton it response. redirect to addContacts.aspx but within the same child window.
i want to close child window and fill the value in parent windows' txtOrgnization.
pls help me i need it...
harigr
Member
38 Points
19 Posts
Re: How to move value from one form to another
May 22, 2009 06:25 AM|LINK
for this issue you can use querystring or session also both will work if using query string need to write a
button.Attributes[
"onClick"] = "javascript:ShowDialog('" + applicationPath +"/Folder/Scrrenname.aspx" + "?QueryStringVariable=" + "Value" + "', '" + "Height and width"+ "')";Otherwise you can use Session.
Dont forget to click "Mark as Answer" on the post that helped you.
demoninside9
Participant
1182 Points
1697 Posts
Re: How to move value from one form to another
May 22, 2009 06:29 AM|LINK
btnOrg.OnClientClick = "window.open('Organization.aspx','mywindow','width=700,height=600')";
this is my code on Page_Load()
bt its blocked by popup blocker.
so what should I d, so that no popupblocker can block it....
cos i can only allow popup on my machine...bt cant on web.
so pls tell me...how..?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 06:34 AM|LINK
If user opens a popup on button or link click it will never be blocked But if you open it directly from your website it will be blocked and nothing can be done for that
Contact me
demoninside9
Participant
1182 Points
1697 Posts
Re: How to move value from one form to another
May 22, 2009 06:43 AM|LINK
is there any other way.. to open a seperate user defined sized .aspx page on a button click..
thanx for quick reply..
demoninside9
Participant
1182 Points
1697 Posts
Re: How to move value from one form to another
May 22, 2009 06:49 AM|LINK
"If user opens a popup on button or link click it will never be blocked"
What did u mean this...?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 06:55 AM|LINK
But if you open on button click it won't be blocked
That's the only way to do it You can have a look at this
http://www.aspsnippets.com/post/2009/05/07/Modal-PopUp-using-JavaScript.aspx
Its the same way but it blocks the backgroud
Contact me
demoninside9
Participant
1182 Points
1697 Posts
Re: How to move value from one form to another
May 22, 2009 07:24 AM|LINK
this is my child page code...where i have bounded radiobuttonlist
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect("addContacts.aspx?id="+RadioButtonList1.SelectedItem.Text);
}
and this is parent page code where i have to fill values...
on addContacts.aspx
txtOrgnization.Text = Request.QueryString["id"].ToString();
so where i have to put this so that after selecting an option in child page automatically fill the parent page's textbox(txtOrgnization)
help me pls...
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 07:33 AM|LINK
Means on button click
<input id="Button2" type="button" value="button" onclick = "window.open('page.aspx')" />Contact me
sgeorge80
Member
240 Points
64 Posts
Re: How to move value from one form to another
May 22, 2009 08:16 AM|LINK
Hi,
You can try modal popup extender from ajax toolkit.
demoninside9
Participant
1182 Points
1697 Posts
Re: How to move value from one form to another
May 22, 2009 08:28 AM|LINK
This is my parent page's code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (txtOrgnization.Text == null)
{
txtOrgnization.Text = Request.QueryString["id"].ToString();
}
else
{
}
} btnOrg.OnClientClick = "window.open('Organization.aspx','mywindow','width=700,height=600')";
and the child page as
on Page_Load
protected void Bind_Organization()
{
string strSql = "select OrgId,OrgnizationName from mtblOrgnization where OrgnizationName like 'W%'";
DataTable dt = new DataTable();
dt = myCls.My_Datatable(strSql);
if (dt.Rows.Count > 0)
{
RadioButtonList1.DataSource = dt;
RadioButtonList1.DataBind();
}
}
// Selecting an organization
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect("addContacts.aspx?id="+RadioButtonList1.SelectedItem.Text);
}
but now the problem is niether this value fill txtOrgnization
and sfter selecting an option on radiobutton it response. redirect to addContacts.aspx but within the same child window.
i want to close child window and fill the value in parent windows' txtOrgnization.
pls help me i need it...