Question: Minor personalization

V

VB Programmer

Simple scenario:
I have a ASP.NET website that users log into. Everyone has a personal page
which they're redirect to after login. Everyone is redirected to the SAME
HTML page, with the exception of this: Near the header it says, "Hi <insert
name>. You live in <city>. Welcome!" Their login name is inserted here,
as well as their <city> which comes from a db. This is the only dynamic
portion of the personal page.

What is the best way to do this? Suggestions?

Thanks!
 
R

Rick Spiewak

One cheap trick is to use <%=Function%> where Function is declared as
Protected in the code-behind and returns a string.
 
H

Hugo Wetterberg

If you want to do it in a more ASP.NET kind of way you could add
labels to the page.

Hi <asp:Label id="lblName" runat="server"></asp:Label>. You live in
<asp:Label id="lblCity" runat="server"></asp:Label>

Then write:
lblName.Text=theName;
lblCity.Text=theCity;
in the page load event handler.

/Hugo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top