Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 April 10th, 2007, 03:55 AM
Authorized User
 
Join Date: Mar 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to smp4774
Default Using Application state variable value in Web form

I am using Application state variable, which used in web form's HTML page's <Title> to display common Application name. But it returns empty string the code is as below. I am using VS .Net 2003

In Global.asax's Application_start event
Application("appname")="Inventory Management System for XYZ Pvt Ltd."

In Web Form's HTML Title tag,
<Title><%# Application("appname) %>-Invoice</Title>

When I run Application it show me only "-Invoice" instead of "Inventory Management System for XYZ Pvt Ltd.-Invoice"

can you help me how to display the Application and company name in Window's title bar.

Thnaks in Advance.


 
Old April 10th, 2007, 07:55 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I suspect the problem is that you are using data binding syntax, but the page isn't executing it's data binding method. Try using the standard "Response.Write" shorthand:

<Title><%=Application("appname)%>-Invoice</Title>


-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Filling and submitting web form by C# application Mystic C# 0 May 2nd, 2006 04:29 AM
tradeoff application vs session state vs page Redden ASP.NET 1.x and 2.0 Application Design 1 October 6th, 2005 12:44 AM
Maintaining State in Web Services tushpri .NET Web Services 1 February 10th, 2005 05:57 AM
Using Application state apry BOOK: Beginning ASP.NET 1.0 7 May 31st, 2004 04:07 AM
IIS Application is unstable in the compiled state Dmitriy Pro VB 6 5 December 9th, 2003 09:51 PM





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