The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Navigation bar ASP.net
Louffeman
post Dec 3 2016, 11:51 AM
Post #1


Member
***

Group: Members
Posts: 69
Joined: 21-June 14
Member No.: 21,123



Hi,
my webmaster has created a site for me in using ASP.net
I find the code source of navigation bar in Dreamweaver and browser are different,
could someone explain for me ?

Dreamwver code source:

<div class="nav">
<ul class="middle">
<li class="li1"><a href="./">Home</a></li>
<li class="li1"><a href="about.asp">About Us</a>
<div class="ul2">
<ul class="middle">
<%
sql="select * from query_info where QType='about' order by order_info desc,id asc"
Rs.open sql,conn,1,1
do while not rs.eof
%>
<li class="li2"><a href="about.asp?id=<%=Rs("id")%>"><%=Rs("Subject")%></a></li>
<%
Rs.movenext
loop
Rs.close
%>
</ul>
</div>
</li>
<li class="li1"><a href="product_show.asp">Product</a>
<div class="ul2">
<ul class="middle">
<%
sql="select top 8 * from product_sort where QType='products' order by orderno desc,id asc"
'response.write sql
Rs.open sql,conn,1,1
do while not rs.eof
%>
<li class="li2"><a><%=Rs("SortName")%></a>
<ul class="ul3">
<%
set Rs1=server.CreateObject("adodb.recordset")
sql="select * from query_products where QType='products' and SortID="&Rs("id")&" order by order_info desc,id asc"
Rs1.open sql,conn,1,1
do while not rs1.eof
%>
<li><a href="product_show.asp?id=<%=Rs1("id")%>"><%=Rs1("ProductName")%></a></li>
<%
Rs1.movenext
loop
Rs1.close%>
</ul>
</li>
<%
Rs.movenext
loop
Rs.close%>
</ul>
</div>
</li>
<li class="li1"><a href="service.asp">Press</a></li>
<li class="li1"><a href="contact.asp">Contact Us</a></li>
</ul>
</div>
</div>

Browser code source:
<div class="nav">
<ul class="middle">
<li class="li1"><a href="./">Home</a></li>
<li class="li1"><a href="about.asp">About Us</a>
<div class="ul2">
<ul class="middle">

<li class="li2"><a href="about.asp?id=345">About1</a></li>

<li class="li2"><a href="about.asp?id=346">About2</a></li>

<li class="li2"><a href="about.asp?id=347">About3</a></li>

<li class="li2"><a href="about.asp?id=349">About4</a></li>

</ul>
</div>
</li>
<li class="li1"><a href="product_show.asp">Products</a>
<div class="ul2">
<ul class="middle">

<li class="li2"><a>Title1</a>
<ul class="ul3">

<li><a href="product_show.asp?id=559">Pro1</a></li>

<li><a href="product_show.asp?id=561">Pro2</a></li>

<li><a href="product_show.asp?id=560">Pro3</a></li>

</ul>
</li>

<li class="li2"><a>item2</a>
<ul class="ul3">

</ul>
</li>

<li class="li2"><a>item3</a>
<ul class="ul3">

</ul>
</li>

<li class="li2"><a>item4</a>
<ul class="ul3">

</ul>
</li>

</ul>
</div>
</li>
<li class="li1"><a href="service.asp">Press</a></li>
<li class="li1"><a href="contact.asp">Contact Us</a></li>
</ul>
</div>
</div>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Christian J
post Dec 3 2016, 02:56 PM
Post #2


.
********

Group: WDG Moderators
Posts: 8,238
Joined: 10-August 06
Member No.: 7



ASP.net uses a server-side script, which is interpreted and turned into HTML on the server. After this the finished HTML is sent to the browser.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 3 2016, 05:10 PM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,400
Joined: 9-August 06
Member No.: 6



The bits that look like this to be specific.
CODE
<%
...
%>

You will never see those when you view source over a server. Unless something is wrong.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 13th October 2019 - 11:19 PM