Treeview with IFRAME Bug


F

Fred

Hi,

I'm using a TreeView Web Control for user navigation. When I configure
SRC IFRAME property in a TreeView Event, the client browser requests
the source address of the IFRAME tag twice.

Help me, Please,

Fred.

*** MORE INFORMATION ***

VS .Net Version: 7.1.3088
..Net Framework Version: 1.1.43.22

01. Start VS.Net and Create a New ASP .NET Web Application;
02. Copy C:\Program Files\IE Web
Controls\build\Microsoft.Web.UI.WebControls.dll to Bin Directory;
03. Add Reference to C:\Program Files\IE Web
Controls\build\Microsoft.Web.UI.WebControls.dll;
04. Create the following folder structure:

webctrl_client\1_0

05. Copy the contents from C:\Program Files\IE Web
Controls\build\Runtime to webctrl_client\1_0;
06. Add the TreeView (Microsoft.Web.UI.WebControls) in the ToolBox;
07. Move a TreeView Control to WebForm1 (Desing view);
08. Add a Root and a Child Nodes to Treeview using the Nodes Property
(Properties Window);
09. Configure Treeview AutoPostBack Property to True;
10. Add SmartNavigation="true" configuration to the Page tag in
WebForm1 (HTML view);
11. Add the following conde before the "</form>" tag in WebForm1 (HTML
view):

<iframe id="MyWin" height="0" width="0" runat="server"></iframe>

12. Switche to Code View (WebForm1.aspx.vb) and add the following
code:

Private Sub TreeView1_SelectedIndexChange(ByVal sender As Object,
ByVal e As Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs)
Handles TreeView1.SelectedIndexChange
MyWin.Attributes("SRC") = "Notepad.exe"
End Sub

13. Copy the "Notepad.exe" from "C:\WIndows" folder to Project Root
Folder;
14. Save, compile and test your project;
15. Expand Node0 and select Node1

*** The "File Download" window appears two fimes! Why? ***

If I move the line: MyWin.Attributes("SRC") = "Notepad.exe" to any
other part of the code, for example the page prerender event, it works
fine.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top