E
Ed West
Hello
What is the proper way in ASP.Net to not show large parts of the page?
For example, if I was showing a record detail page, if the record id
does not exist or they don't have rights to see it, I would just show an
error message and NOT show the rest of the html for the all the fields
in the record. And if possible still be able to use the designer to
place the labels and data, etc. In ASP I would do something like:
<%
if (rs.eof and rs.bof) Then
Response.Write "record id " & rs("id") & " does not exist"
Else NOT HaveRights(rs("id")) Then
Response.Write "YOu do not have rights to see this record."
Else
%>
<table>
<tr><td>First Name:</td><td><%=rs("first_name")%></td></tr>
<tr><td>Last Name:</td><td><%=rs("last_name")%></td></tr>
.. . . .
<% End If
%>
Thanks,
-dan
What is the proper way in ASP.Net to not show large parts of the page?
For example, if I was showing a record detail page, if the record id
does not exist or they don't have rights to see it, I would just show an
error message and NOT show the rest of the html for the all the fields
in the record. And if possible still be able to use the designer to
place the labels and data, etc. In ASP I would do something like:
<%
if (rs.eof and rs.bof) Then
Response.Write "record id " & rs("id") & " does not exist"
Else NOT HaveRights(rs("id")) Then
Response.Write "YOu do not have rights to see this record."
Else
%>
<table>
<tr><td>First Name:</td><td><%=rs("first_name")%></td></tr>
<tr><td>Last Name:</td><td><%=rs("last_name")%></td></tr>
.. . . .
<% End If
%>
Thanks,
-dan