Page.id and Page.UniqueID

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is the Page ID supposed to do anything?
Before service pack 1 on .net 1.1, I had a proper name of the page that I
could use for a generic error routine. Now the ID is blank. The ID is also
useless in ASP.net 2.0 Beta 2.

<%@ Page Language="vb" AutoEventWireup="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Page Test</title>
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
<asp:Label id="pageid" runat="server">Label</asp:Label>
<asp:Label id="pid" runat="server">Label</asp:Label>
</form>
</body>
</HTML>
<script runat=server>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
pageid.text = page.ID
pid.text = page.UniqueID
end sub
</script>
 
Is there really any reason for the ID or Page ID. The most I usually
ever need is the ClientID of a control. And this really only becomes
important from my experience when you are creating user controls, web
controls or if you are using the new master pages.
 

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

Back
Top