Click here to Skip to main content
15,912,756 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: ASP.NET Pin
Mazdak17-Mar-02 21:07
Mazdak17-Mar-02 21:07 
GeneralRe: ASP.NET Pin
Andy Smith18-Mar-02 13:08
Andy Smith18-Mar-02 13:08 
GeneralAgain Datagrid Pin
Mazdak12-Mar-02 7:53
Mazdak12-Mar-02 7:53 
GeneralDynamic LinkButton Text Pin
Marco Cunha12-Mar-02 6:26
Marco Cunha12-Mar-02 6:26 
GeneralRe: Dynamic LinkButton Text Pin
James T. Johnson12-Mar-02 9:18
James T. Johnson12-Mar-02 9:18 
GeneralRe: Dynamic LinkButton Text Pin
Paul Watson14-Mar-02 1:02
sitebuilderPaul Watson14-Mar-02 1:02 
GeneralRe: Using a variable from code behind in aspx Pin
James T. Johnson17-Mar-02 21:54
James T. Johnson17-Mar-02 21:54 
GeneralRe: Using a variable from code behind in aspx Pin
Paul Watson17-Mar-02 22:11
sitebuilderPaul Watson17-Mar-02 22:11 
James T. Johnson wrote:
What were you trying to do with it?

I started typing a reply to you, explaining my problem and what I was trying to do. I even put some code into explain it well...

Then it twigged. Your words "needs to be added to the Page's Controls collection" made me think "Hang on, if I declare a string in the Page class, then maybe I can access it in the ASPX file..." and it worked!

Woohooo, so you solved my problem. Thanks James.

FYI for anyone interested here is the problem and solution:

Initially in my ASPX file I had:
...
 <head> 
  <%string strPageTitle = "Page Editor";%>			
  <title>Numerica - <%Response.Write(strTest);%></title>
 </head>
...


(I used the strPagetitle for other things if you were wondering why I went to all that trouble)

However I wanted to declare that strPageTitle variable in the ASPX.CS (code behind) file, not in the ASPX file. I could not figure it out until James here helped. And this is the solution.

ASPX.CS file:
public class pagemanager : System.Web.UI.Page
{
    protected System.String strTest;

    private void Page_Load(object sender, System.EventArgs e)
    {
        // Put user code to initialize the page here
        strPageTitle = "Page Manager";
    }
...


And with that I could reference strPageTitle in my ASPX file just fine.

Woohoo! Ta James, you opened my eyes a bit more to how the whole ASP.NET model works.

regards,
Paul Watson
Bluegrass
Cape Town, South Africa

"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge

Sonork ID: 100.9903 Stormfront
GeneralRe: Dynamic LinkButton Text Pin
Marco Cunha14-Mar-02 1:48
Marco Cunha14-Mar-02 1:48 
GeneralNewbie Help With Cookies and Forms Pin
kashmir999912-Mar-02 3:55
kashmir999912-Mar-02 3:55 
GeneralRe: Newbie Help With Cookies and Forms Pin
Roger Wright12-Mar-02 13:19
professionalRoger Wright12-Mar-02 13:19 
GeneralRe: Newbie Help With Cookies and Forms Pin
Paul Watson14-Mar-02 1:47
sitebuilderPaul Watson14-Mar-02 1:47 
General.NET vs J2EE Pin
David Salter11-Mar-02 22:41
David Salter11-Mar-02 22:41 
GeneralSyntax-highlight and Command-completion in ASP.NET Pin
Mats Karlsson11-Mar-02 6:15
Mats Karlsson11-Mar-02 6:15 
GeneralRe: Syntax-highlight and Command-completion in ASP.NET Pin
11-Mar-02 8:13
suss11-Mar-02 8:13 
GeneralRe: Syntax-highlight and Command-completion in ASP.NET Pin
Mats Karlsson11-Mar-02 21:46
Mats Karlsson11-Mar-02 21:46 
GeneralDataGrid in ASP.NET Pin
Mazdak10-Mar-02 21:36
Mazdak10-Mar-02 21:36 
GeneralRe: DataGrid in ASP.NET Pin
omkamal11-Mar-02 8:22
omkamal11-Mar-02 8:22 
GeneralRe: DataGrid in ASP.NET Pin
Mazdak11-Mar-02 8:44
Mazdak11-Mar-02 8:44 
GeneralRe: DataGrid in ASP.NET (possible to inheret DataGrid?) Pin
Paul Watson14-Mar-02 2:11
sitebuilderPaul Watson14-Mar-02 2:11 
GeneralRe: DataGrid in ASP.NET (possible to inheret DataGrid?) Pin
Mazdak14-Mar-02 4:04
Mazdak14-Mar-02 4:04 
Generalchanging cursor using javascript for NN4.x Pin
10-Mar-02 18:55
suss10-Mar-02 18:55 
GeneralRe: changing cursor using javascript for NN4.x Pin
Jeremy Falcon13-Mar-02 3:37
professionalJeremy Falcon13-Mar-02 3:37 
GeneralRe: changing cursor using javascript for NN4.x Pin
Nick Parker14-Mar-02 6:51
protectorNick Parker14-Mar-02 6:51 
GeneralChanging window title in netscape Pin
10-Mar-02 18:33
suss10-Mar-02 18:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.