Navigation bar ASP.net |
Navigation bar ASP.net |
Louffeman |
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> |
Christian J |
Dec 3 2016, 02:56 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,722 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.
|
pandy |
Dec 3 2016, 05:10 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 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. |
Christian J |
Dec 3 2016, 05:52 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
You will never see those when you view source over a server. Unless something is wrong. True. Sometimes things do go wrong though, so don't rely on the server for hiding sensitive data (e.g. passwords) this way. Ideally such data should be included by the script from files above the web root. |
Louffeman |
Dec 4 2016, 02:45 PM
Post
#5
|
Member Group: Members Posts: 69 Joined: 21-June 14 Member No.: 21,123 |
|
Louffeman |
Dec 4 2016, 02:48 PM
Post
#6
|
Member Group: Members Posts: 69 Joined: 21-June 14 Member No.: 21,123 |
You will never see those when you view source over a server. Unless something is wrong. True. Sometimes things do go wrong though, so don't rely on the server for hiding sensitive data (e.g. passwords) this way. Ideally such data should be included by the script from files above the web root. the Dreamweaver code is impossible to understand, I cannot modify to increase or cancel a item |
pandy |
Dec 4 2016, 02:59 PM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
CODE <% ... %> it's not the ASP.Net code ? Yes, the ASP code is within those signs. And that's why you don't see it over the server. The server interprets the ASP and replaces it with what the code instructs it do do. What's sent to the browser is always plain HTML (and CSS and JavaScript). The ASP is all gone. Another programming language that can be embedded in HTML like this is PHP. It's called pre processing. Languages like for example Perl work differently. A Perl script can be called from a HTML page but you can't embed snips of programming like this. |
pandy |
Dec 4 2016, 03:00 PM
Post
#8
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
|
Christian J |
Dec 4 2016, 04:12 PM
Post
#9
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
|
Christian J |
Dec 4 2016, 04:24 PM
Post
#10
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
the Dreamweaver code is impossible to understand, I cannot modify to increase or cancel a item Do you mean the ASP script code you can see in DreamWeaver? I don't think Dreamweaver is the problem, but ASP uses different scripting languages (like JScript or VBScript) that you need to understand. I also see database queries in your ASP code example, perhaps it's those database entries that need to be edited? Alas I don't know how that works with ASP.NET. |
pandy |
Dec 4 2016, 04:24 PM
Post
#11
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
I meant in the sense that you can't embed actual programs/scipts in a HTML page and have the server parse the page for that as with PHP and ASP. It isn't a preprocessor (if that's even a term). Instead the script must be called, like when submitting a form. The result can be that the script generates a whole now page with the desired result.
|
pandy |
Dec 4 2016, 04:29 PM
Post
#12
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,753 Joined: 9-August 06 Member No.: 6 |
the Dreamweaver code is impossible to understand, I cannot modify to increase or cancel a item Do you mean the ASP script code you can see in DreamWeaver? I don't think Dreamweaver is the problem, but ASP uses different scripting languages (like JScript or VBScript) that you need to understand. I also see database queries in your ASP code example, perhaps it's those database entries that need to be edited? Alas I don't know how that works with ASP.NET. Or if the document can't be edited at all, maybe it's that DW feature, forgot what it's called, that prevents everything but specially denoted sections to be edited? Some collaboration thing, so people with less skills can't *beep* up the whole document. |
Louffeman |
Dec 5 2016, 10:48 AM
Post
#13
|
Member Group: Members Posts: 69 Joined: 21-June 14 Member No.: 21,123 |
the Dreamweaver code is impossible to understand, I cannot modify to increase or cancel a item Do you mean the ASP script code you can see in DreamWeaver? I don't think Dreamweaver is the problem, but ASP uses different scripting languages (like JScript or VBScript) that you need to understand. I also see database queries in your ASP code example, perhaps it's those database entries that need to be edited? Alas I don't know how that works with ASP.NET. Or if the document can't be edited at all, maybe it's that DW feature, forgot what it's called, that prevents everything but specially denoted sections to be edited? Some collaboration thing, so people with less skills can't *beep* up the whole document. My aim is to modify the navigation bar by myself, now it seems not possible |
Louffeman |
Dec 5 2016, 10:49 AM
Post
#14
|
Member Group: Members Posts: 69 Joined: 21-June 14 Member No.: 21,123 |
the Dreamweaver code is impossible to understand, I cannot modify to increase or cancel a item Do you mean the ASP script code you can see in DreamWeaver? I don't think Dreamweaver is the problem, but ASP uses different scripting languages (like JScript or VBScript) that you need to understand. I also see database queries in your ASP code example, perhaps it's those database entries that need to be edited? Alas I don't know how that works with ASP.NET. the Microsofe Access is the database for ASP.Net, do you know the PHP, has it database software ? which is his name ? |
Christian J |
Dec 5 2016, 01:58 PM
Post
#15
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
|
Christian J |
Dec 5 2016, 01:58 PM
Post
#16
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
PHP can be used with many different databases, maybe MS Access too, but I don't know any details.
|
Louffeman |
Dec 6 2016, 04:18 AM
Post
#17
|
Member Group: Members Posts: 69 Joined: 21-June 14 Member No.: 21,123 |
|
Lo-Fi Version | Time is now: 26th September 2024 - 10:46 AM |