Omego2K
Sorry I made a mistake, it's a Datalist not a DataGrid.
In my code behind, it won't recognize my iframe ID because it is in a DataList. Is there anotherway I can do this?
I have an iframe that is within a DataGrid. The data within each iFrame is different and I want to adjust the height according to the data in the iframe.
Can I do something like this?
CType(grid.Items(i).FindCo
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
posting the language would be helpful next time
In the ItemCreated event of the DataList object, put the following:
Dim ctr System.Web.UI.HtmlControls
ctr.Attributes("height") = "23"
Where you see "myid" replace it with the id you gave to your iframe, additionally, make sure the iframe has the "runat" attribute eg:
<iframe id="myid" runat="server" src="whatever"></iframe>
I know, sorry for not putting the language in there. OK now it's not letting me put the runat="server" tag in the HTML. It's giving me this error:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 554: <iframe id="iBoxProfile" src="iFrameProfile.aspx?Us
Line 555: frameborder="0" scrolling="auto" width="170" height="210" visible="true" runat="server"></iframe>
Any idea why? Thanks for you help.
Omega2K,
Just wanted to let you know what I finally ended up doing.
I created a literal in my HTML and in the code behind created the following where I could set the height based on certain criteria. Thanks for your help.
sProfileDisplay = "<iframe id=""iBoxProfile"" src=""iFrameProfile.aspx?U
CType(gridFeedback.Items(i
Business Accounts
Answer for Membership
by: Omego2KPosted on 2009-10-23 at 14:10:43ID: 25648654
declare your iframe with an ID and a runat="server" property
height"] == null) ght"].Add( "height", [whatever height]); ght"] = "23";
in the codebehind, do this:
if(myIframeID.Attributes["
myIframeID.Attributes["hei
else
myIframeID.Attributes["hei