Форумы ASP.NET Первая страница»  Поиск   Вход   Регистрация   Участники 
Технология ASP.NET  > IBS Workshop FAQ  > Simple IFrame Improvement  
 
Отображать:  
Предыдущая тема :: Следующая тема 
 Автор  Тема: Simple IFrame Improvement
Admin is not online. Last active: 6/11/2003 3:32:52 PM Admin
Top 25 Poster
Модератор форума
Присоединился: 18 Mar 2003
Число сообщений: 36
 
Simple IFrame Improvement
Отправлено: 18 Mar 2003 07:04 PM
modified the following code to make the IFrame module autosize the width to be 100% of the continer it resides in. I thought the same change could be done for the hieght as well, but it doen't work.

Just set the width of the IFrame to -1 to make it autosize.

Does anyone know how to make the height autosize to the target url page?

In \DesktopModules\IFrame\IFrame.ascx

--- OLD ------------------------------------------------------------------

If strSrc <> "" Then
lblIFrame.Text = "<iframe frameborder=" & strBorder & " src=" & IIf(InStr(1, ......."
End If

--- NEW ------------------------------------------------------------------

Dim strIFrameText As String

If strSrc <> "" Then

' setup IFrame string

strIFrameText = "<iframe frameborder=" & strBorder & " src=" & IIf(InStr(1, LCase(strSrc), "http://") = 0, "http://", "") & strSrc

' Handle height

strIFrameText = strIFrameText & " height=" & strHeight

' Handle width

If IsNumeric(strWidth) Then
If CLng(strWidth) >= 0 Then
strIFrameText = strIFrameText & " width=" & strWidth
Else
strIFrameText = strIFrameText & " width=100%"
End If
Else
strIFrameText = strIFrameText & " width=100%"
End If

' Add rest of IFrame statement

strIFrameText = strIFrameText & " scrolling=" & strScrolling & ">Your Browser Does Not Support Frames</iframe>"

' Assign the IFrame string to the label

lblIFrame.Text = strIFrameText

End If

--------------------------------------------------------------------

I think this would be a nice addition to 1.0.5.

I even added a label control next to the width textbox in EditIFrame.ascx that states "Note: Use -1 to autosize"

Please help with the autosize of the height, if you can.

Thanks alot,

chulcy

//Igor
Предыдущая тема :: Следующая тема 
Страница 1 из 1
 
Перейти к:
Форумы ASP.NET  > Технология ASP.NET  > IBS Workshop FAQ  > Simple IFrame Improvement