Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 How to i write the value of IFrame to parent ?

Author  Topic 

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-07-02 : 18:06:37
Hello,

I have a webpage that has an inline frame with checkboxs autogenerated from the database.

Now how do I write the value of the checkboxs ( on auto postback) to a textbox in the parent page.

The script below is from the inline frame. And label3 exists in the inline frame. However label1 exists only on the parent frame and gives an error on runtime

please help

thanks

Ehi



protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
Label3.Text = "test";

// Label1.Text = "Testing ":

}

sdhimann
Starting Member

1 Post

Posted - 2008-07-03 : 20:10:27
you need to find Label1 control in frame using findcontrol. then use this label1.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-07-03 : 20:20:41
I did some google search and reading up.

Pages are stateless and dont know of each other's existence. So am trying to use frontend jscript.
tnx
Go to Top of Page

Rajani@30
Starting Member

6 Posts

Posted - 2008-07-04 : 04:26:01
yes u r right. u need to make use of javascript.
and register this script for the CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e) event.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-07-04 : 04:42:01
tnx
Go to Top of Page
   

- Advertisement -