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

 

IF Len statement in EWD

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

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

All Forums >> Web Development >> Expression Web Help >> IF Len statement in EWD
Page: [1]
 
marabe

 

Posts: 32
Joined: 2/26/2004
Status: offline

 
IF Len statement in EWD - 9/4/2007 17:00:15   
Hi,

I've used FP mostly and try to get around EWD. I have an old if len statement from a DRW that I wish to modify to expression web. Is this doable in design view or do I need to re-code it manually. And in that case, can anyone help me with the syntax in EW?

<a class="menyleft" href="read_recension.asp?key=<%=FP_FieldLink(fp_rs,"Key")%>" title="Av <%=FP_Field(fp_rs,"Author_Name")%>">
<%
If len(FP_Field(fp_rs,"Titel")) > 20 then
response.write Left(FP_Field(fp_rs,"Titel"), 20) &".."
else
response.write (FP_Field(fp_rs,"Titel"))
end if
%>
</a>

/Best
rdouglass

 

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

 
RE: IF Len statement in EWD - 9/5/2007 9:26:15   
What specifically is the issue? Does this not run / error out?

_____________________________

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

ASP Checkbox Function Tutorial.

(in reply to marabe)
marabe

 

Posts: 32
Joined: 2/26/2004
Status: offline

 
RE: IF Len statement in EWD - 9/6/2007 4:50:07   
First I tried to find possible solution i design view, but i guess it's not available.

I'm no coder, but I tried a similar approach on the EW code:

<asp:hyperlinkfield HeaderText="linkreview"

<% If len(DataTextField="Titel") > 18 then
response.write Left(DataTextField="Titel"), 18) &".."
else
response.write DataTextField="Titel"
end if
%>

DataNavigateUrlFormatString="read_recension.asp?key={0}" DataNavigateUrlFields="Key">
<ControlStyle CssClass="menyleft" />
</asp:hyperlinkfield>

</asp:hyperlinkfield>


I get this error, so i guess I'm on the wrong track:

Parser Error Message: Literal content ('<asp:hyperlinkfield HeaderText="linkreview"') is not allowed within a 'System.Web.UI.WebControls.DataControlFieldCollection'.
/Best

< Message edited by marabe -- 9/6/2007 14:49:12 >

(in reply to marabe)
Page:   [1]

All Forums >> Web Development >> Expression Web Help >> IF Len statement in EWD
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