Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 1st, 2006, 03:52 PM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem calling a script from IE

I've created a way to dynamically call a VB script from an ASP.NET page, like this:

Code:
Code:
'Dynamic VB file
Dim dynamicscript1 = "<script language=""vb"" runat=""server"" src=""/maindirectory/"
Dim dynamicscript2 = dir_path + subdir1_path + subdir2_path
Dim dynamicscript3 = "bgscripts/vb/"
Dim dynamicscript4 = page_path
Dim dynamicscript5 = ".vb"" />"
Response.Write(dynamicscript1 + dynamicscript2 + dynamicscript3 + dynamicscript4 + dynamicscript5)
Result:
<script language="vb" runat="server" src="/maindirectory/directory/subdirectory1/subdirectory2/pagename.vb" />
Firefox = Shows up great on display and in source code
IE = Shows up in code, but not on display of page. Page is just blank.

I also manually put the same resulting script onto the page, and the page loaded fine in IE. It's only having a problem when I use the above script. If anyone can help me to figure out what I'm doing wrong, it would be greatly appreciated. Thanks.

KWilliams
 
Old February 1st, 2006, 04:37 PM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I received a working answer from another forum, and here it is:

Quote:
quote:I wouldn't think it would matter on a server side script (runat="server") but I've had issues in the past with using the XML shorthand on script tags. You might want to go ahead and try the long way (make dynamicscript5 = ".vb""></script>" instead.)
So I just changed it from:
".vb"" />"
to:
".vb"" /></script>"

...and it now works great. Thanks anyway:)

KWilliams





Similar Threads
Thread Thread Starter Forum Replies Last Post
CALLING A TEMPLATE WITHIN JAVA SCRIPT SOMANATHAN10 XSLT 6 February 14th, 2007 02:10 AM
PBX Calling Script shirazap Classic ASP Professional 0 November 9th, 2006 04:50 PM
Calling one VB.NET script from another kwilliams VB.NET 2 September 11th, 2006 06:26 AM
Java script function is not calling in Mozilla mouli_sam ASP.NET 1.0 and 1.1 Professional 0 May 9th, 2006 01:44 AM
Calling a HTML page from an ASP script Brutus Buckeye ASP.NET 1.0 and 1.1 Basics 1 November 2nd, 2005 03:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.