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
All-Star
78956 Points
13402 Posts
MVP
May 22, 2009 02:18 PM|LINK
use this javascript instead of previous one
<script type = "text/javascript"> function RedirectParent(tbl) { var inputs = tbl.getElementsByTagName("input"); for(var i=0;i<inputs.length;i++) { if(inputs[i].checked) { var lbl = inputs[i].parentNode.getElementsByTagName("label")[0]; window.parent.location.href = "addcontacts.aspx?id=" + encodeURIComponent(lbl.innerHTML); window.close(); } } } </script>
And in code behind of addContacts do
{
txtOrgnization.Text = ids.ToString();
}
Participant
1626 Points
1823 Posts
May 22, 2009 03:10 PM|LINK
all is running fine .... but the value we are taking from child form is not filling in parent form's txtOrgnization control....
do u missing somthing or should i paste all code....?
thank u so much for stay hang with me...[:)]
May 22, 2009 04:26 PM|LINK
what is "example script" even the child form is not comming after button click...not working..
thanx..
May 22, 2009 04:42 PM|LINK
Just check whether the id is received there or not by putting a breakpoint
May 22, 2009 05:01 PM|LINK
I have putted the breack point here... and cheking the value by pressing F11
but sorry dear as i m new.. so from where i can c the value..
May 22, 2009 05:11 PM|LINK
Just put a breakpoint on the line after this line
And move your move over ids it will show its value
May 22, 2009 05:25 PM|LINK
It shows null
May 22, 2009 05:30 PM|LINK
Do you see ID in the browser url?
May 22, 2009 05:39 PM|LINK
Nops.. it shows http://localhost:3402/Sangrah/addContacts.aspx as it is, as it was even after selecting a radiobutton opton..
May 22, 2009 06:03 PM|LINK
did you remove autopostback=true and selected changed event from radio buttonlist?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 02:18 PM|LINK
use this javascript instead of previous one
<script type = "text/javascript">
function RedirectParent(tbl)
{
var inputs = tbl.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
if(inputs[i].checked)
{
var lbl = inputs[i].parentNode.getElementsByTagName("label")[0];
window.parent.location.href = "addcontacts.aspx?id=" + encodeURIComponent(lbl.innerHTML);
window.close();
}
}
}
</script>
And in code behind of addContacts do
protected void Page_Load(object sender, EventArgs e){
if (!IsPostBack){
string ids =Server.UrlDecode(Request.QueryString["id"]);if (ids != null){
txtOrgnization.Text = ids.ToString();
}
else{
}
}Contact me
demoninside9
Participant
1626 Points
1823 Posts
Re: How to move value from one form to another
May 22, 2009 03:10 PM|LINK
all is running fine .... but the value we are taking from child form is not filling in parent form's txtOrgnization control....
do u missing somthing or should i paste all code....?
thank u so much for stay hang with me...[:)]
Gaurav
demoninside9
Participant
1626 Points
1823 Posts
Re: How to move value from one form to another
May 22, 2009 04:26 PM|LINK
what is "example script" even the child form is not comming after button click...not working..
thanx..
Gaurav
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 04:42 PM|LINK
Just check whether the id is received there or not by putting a breakpoint
Contact me
demoninside9
Participant
1626 Points
1823 Posts
Re: How to move value from one form to another
May 22, 2009 05:01 PM|LINK
I have putted the breack point here... and cheking the value by pressing F11
string ids = Server.UrlDecode(Request.QueryString["id"]);but sorry dear as i m new.. so from where i can c the value..
thanx..
Gaurav
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 05:11 PM|LINK
Just put a breakpoint on the line after this line
And move your move over ids it will show its value
Contact me
demoninside9
Participant
1626 Points
1823 Posts
Re: How to move value from one form to another
May 22, 2009 05:25 PM|LINK
It shows null
Gaurav
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 05:30 PM|LINK
Do you see ID in the browser url?
Contact me
demoninside9
Participant
1626 Points
1823 Posts
Re: How to move value from one form to another
May 22, 2009 05:39 PM|LINK
Nops.. it shows http://localhost:3402/Sangrah/addContacts.aspx as it is, as it was even after selecting a radiobutton opton..
Gaurav
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: How to move value from one form to another
May 22, 2009 06:03 PM|LINK
did you remove autopostback=true and selected changed event from radio buttonlist?
Contact me