kwilliams Posted February 1, 2006 Share Posted February 1, 2006 I've created a way to dynamically call a VB script from an ASP.NET page, like this:Code: 'Dynamic VB fileDim dynamicscript1 = "<script language=""vb"" runat=""server"" src=""/maindirectory/"Dim dynamicscript2 = dir_path + subdir1_path + subdir2_pathDim dynamicscript3 = "bgscripts/vb/"Dim dynamicscript4 = page_pathDim 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 codeIE = 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. Link to comment Share on other sites More sharing options...
kwilliams Posted February 1, 2006 Author Share Posted February 1, 2006 I received a working answer from another forum, and here it is: 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:) Link to comment Share on other sites More sharing options...
aspnetguy Posted February 1, 2006 Share Posted February 1, 2006 its funny how stupid things like that can cause so much trouble. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now