navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

DRW vs ASPX?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> DRW vs ASPX?
Page: [1]
 
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
DRW vs ASPX? - 4/15/2008 12:08:31   
Hello,

I'm trying to convert an existing page that utilizes the DRW from ASP to ASP.NET, since I have a new TreeView menu I've added that requires ASP.NET 2.0

I came across this page here, which indicates that the DRW and ASPX pages are mutually exclusive; I also discovered this on my own when the page failed to compile properly, and after removing this reference, "<!--#include file="_fpclass/fpdblib.inc"-->", my page compiled (albeit without the DRW functionality).

I tinkered a bit and tried putting this section into an iframe, but the page won't validate for xhtml strict, and it looks ugly and is not the way I want to go.

Can anyone tell me of a possible workaround I could use that would not entail my having to convert my Access database over to SQL, etc? I really want to retain the keyword search (via DRW) that I have on the page, in addition to my TreeView menu. Thank you in advance...

Oh, and here is the error message I get (because of the failure with fpdblib.inc):
Compiler Error Message: CS1010: Newline in constant

Source Error:

Line 48: If Not IsEmpty(rs) And Not (rs Is Nothing) and Not IsNull(rs(fldname)) Then
Line 49: Select Case rs(fldname).Type
Line 50: Case 128, 204, 205 ' adBinary, adVarBinary, adLongVarBinary
Line 51: FP_Field = "[#BINARY#]"
Line 52: Case 201, 203 ' adLongVarChar, adLongVarWChar


Source File: c:\Inetpub\wwwsites\LibraryWeb\_fpclass\fpdblib.inc Line: 50


And here is the relevant code:

<!--#include file="_fpclass/fpdblib.inc"-->  
<% Session.Abandon %>
<% if 0 then %>
<script type="text/javascript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</script>
<% end if %>

<form method="post" action="favorites-searchresults-keyword.asp"><div>
	<input name="keyword" type="text" size="25" /><select name="Select1">
	<option value="contains this keyword" selected="selected">contains this keyword</option>
	<option value="exactly this keyword">exactly this keyword</option>
	<option value="starts with this keyword">starts with this keyword</option>
	<option value="ends with this keyword">ends with this keyword</option>
	</select><br />
	<div class="centered"><input name="Submit1" type="submit" value="Submit" /><input name="Reset1" type="reset" value="Reset" /></div></div></form>
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/15/2008 14:29:08   
Actually, is there a way I can adapt the "fpdblib.inc" file to work with ASP.NET?

(in reply to IronWill)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/15/2008 17:54:38   
Ha ha anyone? I know this one is unusual... It would be super though if I could get my aspx page to work with the fpdblib.inc file. Either that, or if there is an alternate methodology that would let me keep my Access database but still let me do the keyword search to it from the aspx page. I've been Googling for hours, and I can't find a thing... :)

(in reply to IronWill)
rdouglass

 

Posts: 9229
From: Biddeford, ME USA
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 8:27:23   
To be honest, I don't think it's do-able unless thru a convoluted Iframe or some AJAX method. And I don't think you'd be able to cram it into a TreeView component anyways.

DRW is ASP. Period.

If you want ASPX pages, drop the DRW.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to IronWill)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 10:25:38   

quote:

ORIGINAL: rdouglass

To be honest, I don't think it's do-able unless thru a convoluted Iframe or some AJAX method. And I don't think you'd be able to cram it into a TreeView component anyways.

DRW is ASP. Period.

If you want ASPX pages, drop the DRW.


Thank you for the reply! Confirms what I suspected. I was thinking that maybe instead of an iFrame, I might be able to use a regular frame at the "bottom" of the TreeView menu for the search box, so it wouldn't be beholden to IE only and I wouldn't have to use the "twice-cooked" method with an object tab... It's just hard to believe that ASP.NET wouldn't be backwards-compatible with something ASP supported, but I guess MS had their reasons for what they did.

Anyway, for the sake of completeness, I'll post here with whatever "solution" I decide to use...

-_Will

(in reply to rdouglass)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 10:39:37   
You aren't going to believe this... but I got it to work.

Turns out that the reference I had in my page to the fpdblib.inc file was totally unnecessary, and was actually leftover code from a different search I had in the same page previously above the keyword search. When I take out that reference, and the "if, then" code I had also above the keyword search, my page works. I couldn't understand before why the Session.Abandon even kept showing up as an error, but it all came down to the fpdblib.inc screwing everything up in the aspx page. I actually brainstormed this last night when I was trying to fall asleep, and decided I'd try it today. Hah! Thank you again for keeping me pointed in the right direction on this one, otherwise I might have gone against my own instinct and tried something more convoluted. :)

(in reply to rdouglass)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 13:00:45   
I do have another somewhat-related question though: is there a way to get multiple TreeViews on the same page? Specifically, I have a table, with two cells in the same row, and I want to have one column with a TreeView if the left-hand cell, and then another TreeView column in the right-hand cell; basically, one long TreeView will be too long for the page, and I'd rather be able to split it up into two columns so I can utilize more of the page space.
Unfortunately, ASp.NET won't let me have more than one form with "runat-server" on the same page... I'm stymied.

(in reply to rdouglass)
rdouglass

 

Posts: 9229
From: Biddeford, ME USA
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 13:32:53   
quote:

Unfortunately, ASp.NET won't let me have more than one form with "runat-server" on the same page


That's because typically the whole ASPX page is a form. You can have more than 1 TreeView on a page. They need to have different ID's of course but they can have different or the same data sources.

This is where it becomes difficult to mix and match ASP and ASP.NET. Since everything with a runat=server tag (TreeViews, etc.) needs to be inside a form that is runat=server, you can't put any ASP forms inside that runat=server form.

See the quandry?

I find it sooooo much easier to be either .NET or Classic on a page and not both; I don't even attempt both any more since it is by no means trivial. Now many of your ASP items *will* run on an ASPX page but many of them will need to be tweaked a little. You've already stepped away from the DRW stuff; you may want to consider stepping away from more of it.

How complex is the page?

That help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to IronWill)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 14:42:13   
The page has some server-side includes for CSS and some menus and stuff, but nothing inherently complex...

Basically what I want to do is take one long list of TreeView items, and break it into two, with one half on the left side of the page, and the second half on the right side (instead of having one really long list). I had been using a table within my main div for two <UL>'s for this purpose previously...

(in reply to rdouglass)
rdouglass

 

Posts: 9229
From: Biddeford, ME USA
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:02:46   
What is your data source for the treeview? Is it something you can split in 2? Is it a .sitemap file, an XML, file, etc? You obviously need 2 TreeViews but you'll need to split the data source as well.

How many forms on the page? My previous statement regarding the forms is the biggie.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to IronWill)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:03:12   
Oh, and if it turns out to be basically impossible to do two TreeViews on the same page, is there a way instead that I can make the TreeView horizontal across the page instead of vertical? And it would have to be limited to the browser window width...

(in reply to rdouglass)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:05:17   
The data source is really simple--it is simply a list of links, with "subjects" as the parent nodes and "categories" as the leaf nodes. I can easily split the list into two manually (already done so, actually), I just can't make it work because of the ASP.NET form/runat=server issue.

(in reply to rdouglass)
rdouglass

 

Posts: 9229
From: Biddeford, ME USA
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:15:06   
Have you tried moving the whole body of the page inside the form?

<body>
<form runat=server....
'page content
</form>
</body>

Again my important question regarding other forms on the page. You can only have 1 runat=server form and forms cannot be nested.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to IronWill)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:22:46   
Okay, *that* worked--I now have the two TreeView columns I needed, side by side in their respective table cells on the page.

One glitch though--the "keyword" search form I had on the same page above the TreeView now does not work. Or, rather, it appears to be posting (nothing) to the same page instead of posting to the search results page...

(in reply to rdouglass)
rdouglass

 

Posts: 9229
From: Biddeford, ME USA
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:31:06   
Is it still inside it's own <form>? Can't do that.

quote:

I find it sooooo much easier to be either .NET or Classic on a page and not both

:)

IMO you need to either make your scripts for that keyword form work on the ASPX page or get it outside the runat=server form.

I honestly don't know how else to say it. :)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to rdouglass)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 15:48:22   
I'm not sure it's possible then? If I put the keyword search out side of the TreeView form, won't it be off the body of the page for that?

As far as adjusting the actual keyword search form code to work in ASPX, it was working fine until I got the TreeView working properly... Here's the code I'm using for the keyword search:

<form method="post" action="favorites-searchresults-keyword.asp"><div>
	<input name="keyword" type="text" size="25" /><select name="Select1">
	<option value="contains this keyword" selected="selected">contains this keyword</option>
	<option value="exactly this keyword">exactly this keyword</option>
	<option value="starts with this keyword">starts with this keyword</option>
	<option value="ends with this keyword">ends with this keyword</option>
	</select><br />
	<div class="centered"><input name="Submit1" type="submit" value="Submit" /><input name="Reset1" type="reset" value="Reset" /></div></div></form>


Is there some other method than a <form> that would allow me to duplicate this functionality?

(in reply to rdouglass)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 16:00:13   
Okay, I got it to work. I moved the <form> tags around the table, and it worked, so since my keyword search form is outside of the table already, no conflict.

Now I'm getting some validation errors on my page though when I run it through the W3C validator, and it is for code that isn't even on my page--it looks to be having a problem with the code that ASP.NET is generating. Is there any way around this?

Thanks again for all the help!

(in reply to rdouglass)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 16:32:33   
Here are the validation errors that are occurring when I run it through the W3C (xhtml 1.0 strict) validation tool:

Validation Output:  4 Errors

   1. Error Line 323, Column 11: there is no attribute "name".

      <form name="form1" method="post" action="favorites-test.aspx" id="form1">

      ✉

      You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

      This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

      How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
   2. Error Line 324, Column 271: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

      …lldzJXvgBrmwSxsHYSNtLe3uY225tOtg==" />

      ✉

      The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

      One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
   3. Error Line 343, Column 170: there is no attribute "border".

      …5625000" width="0" height="0" border="0" /></a><div id="TreeView1">

      ✉

      You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

      This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

      How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
   4. Error Line 484, Column 311: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

      …DqkN4CpfozXAJr9qepw+YsTT4gaSX9RIs=" /></form>

      ✉

      The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

      One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


I've double-checked, and I definitely do not have the "name" attribute in any of my forms on the page. Very odd. I'm Googling around on this issue, but so far am turning up zilch...

(in reply to rdouglass)
rdouglass

 

Posts: 9229
From: Biddeford, ME USA
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 17:00:40   
quote:

W3C (xhtml 1.0 strict)


To be honest, I've never had a whole lot of luck getting .NET stuff to validate strict. Have you tried transitional? I have good luck with that.

EDIT: This is the start of just about every ASPX page I do:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

I have good luck validating that with .NET controls. Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to IronWill)
IronWill

 

Posts: 104
Joined: 3/8/2007
Status: offline

 
RE: DRW vs ASPX? - 4/16/2008 17:15:24   
Hee hee, I just stumbled upon the problem. Apparently ASP.NET doesn't natively create strict xhtml-compliant code. But it looks like there is an option in .NET 3.5 to add a setting to the web.config file to tell ASP.NET to generate proper code (here's the relevant link, and here's the page I got there from). From the article, it appears to only refer to 3.5 and not lower versions. We're currently only running 2.0 on our Web server, though our IT coordinator is looking into 3.5, so I assume that's why it didn't work when I actually added the line to the web.config file; when we enable 3.5, it should work.

So for now I'm not going to sweat it. There's only 4 errors, and they all seem to match up with the kinds of validation errors inherent to the ASP.NET code.
If I hadn't come across this, I would have attempted some kind of string replacement code in the page, but that's kind of an ugly workaround, IMO.

Anyway, I really appreciate all your help! :)

--Will

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> General Web Development >> DRW vs ASPX?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts