![]() |
|
|
|
#1 |
|
Hi all,
A basic question!! I have a user control(.ascx) in my app. I am trying to use use values stored in the appliacation object. In the user control i am placing the code <% Response.Write(Application("myVariable"))%>. In classic asp this would work fine..but..when i execute the aspx page containing the control the variable content is not outputted. Any thoughts? Sample Code: <%@ Control Language="vb" autoeventwireup="true" Src="header.ascx.vb" Inherits="myNameSpace.Header" %> <% If Not(Request.QueryString("header") = "false") Then %> <%Response.Write(Application("UrlPrefix"))%> <asp:Table id="tblNavigation" cssClass="tblNavigation" cellSpacing="0" Width="950" cellPadding="0" borderWidth="0" Runat="server"> <asp:TableRow runat="server"></asp:TableRow> </asp:Table> <% End If %> Cheers, Adam Adam Knight |
|
|
|
|
#2 |
|
Posts: n/a
|
Your code looks okay, assuming Application("UrlPrefix") has something
in it. Try something like this to see what's in there (air-coding, and I am a c# guy): If Application("UrlPrefix") Is Nothing Then Response.Write("<NULL>") Else Response.Write("Type: " & Application("UrlPrefix").GetType().Name & ", Value: """ + Application("UrlPrefix").ToString() + """") End If dcassar@cmcdataworks.com |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to open Web Application pages (ASPX) in Windows application. | arameshmca | Software | 1 | 02-07-2008 03:18 AM |
| Server Error in '/Forms' Application. | AxleWack | General Help Related Topics | 0 | 10-11-2007 01:47 PM |
| How to revert file to unknown application | perezla | General Help Related Topics | 1 | 09-12-2007 03:15 AM |
| Active X cannot create this object | gellison | General Help Related Topics | 0 | 08-09-2007 06:42 PM |
| deploy web application behind a server (no NAT) | xavoux | Software | 0 | 06-22-2006 01:11 PM |