homepage Welcome to WebmasterWorld Guest from 23.22.179.210
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
invalid property assignment error
KRMwebdesign




msg:4257487
 7:34 pm on Jan 24, 2011 (gmt 0)

Hi All,
I'm getting an "invalid property assignment error" on this small piece of code:

<%=RsNews(RTrim,10("story")) %>

Can anyone see my error?

 

bmcgee




msg:4257711
 4:53 am on Jan 25, 2011 (gmt 0)

You probably mean:
<%=RTrim(RsNews("story")) %>

But I don't know what you are trying to do with the ",10"

coderPros




msg:4259845
 9:25 am on Jan 29, 2011 (gmt 0)

I'm taking a stab and saying that KRM probably means


<%= mid(RsNews("story"),1,10) %>


It would help if you told us exactly what you're looking to do.;) The code I provided you returns only the first ten characters of RsNews("story").

KRMwebdesign




msg:4259875
 11:31 am on Jan 29, 2011 (gmt 0)


Hi guys,
Thanks for the replies. It was actually <%= Left(RsNews("storydetails"),100) %> I was looking for to return the first 100 characters of the field. Is that the correct statement?

Thanks :)

Staffa




msg:4259877
 11:59 am on Jan 29, 2011 (gmt 0)

That is the correct statement

coderPros




msg:4259896
 1:47 pm on Jan 29, 2011 (gmt 0)

Yup...that's correct.

The function that I mentioned in my previous post does a fairly similar function. It will return the characters between your start index and length....so to accomplish the same thing you did, you'd use:


<%= Mid(RsNews("storydetails"),1,100)%>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved