CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 6/26/2004 8:32:47 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 23 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
belete
Asp.Net User
Compilation error6/26/2004 8:32:47 PM

0/0

Can U guys see error in this code . I have got the follwowing error:

Compiler Error Message: BC30491: Expression does not produce a value.

Source Error:
Line 7: sub page_Load(obj as object, e as eventargs)
Line 8:
Line 9: Response.write(Encrypt("test") & "<br>")
Line 10: Response.write(Decrypt(Encrypt("test")) & "<br>")
Line 11:

---------------------


<%@ Page Language ="VB" %>

<Script runat="server">


sub page_Load(obj as object, e as eventargs)

Response.write(Encrypt("test") & "<br>")
Response.write(Decrypt(Encrypt("test")) & "<br>")

End sub

sub Encrypt(pwdStr AS String)
Dim i
Dim Cha
For i = 1 To Len(pwdStr)
Cha = Asc(Mid(pwdStr, i, 1))
Encrypt = Encrypt & Chr(((Cha Xor 111) + 32) Mod 256)
Next
End sub

sub Decrypt(pwdStr As String)
Dim i
Dim Cha
For i = 1 To Len(pwdStr)
Cha = Asc(Mid(pwdStr, i, 1))
Decrypt = Decrypt & Chr(((Cha - 32 + 256) Mod 256) Xor 111)
Next
End sub

</Script>
<html>
<body>
</body>
</html>




Thank U.
bdesmond
Asp.Net User
Re: Compilation error6/26/2004 9:45:23 PM

0/0

Yes. Subs do not return a value, they just execute a block of code. You need to change those to functions, and then use the return statement, for example:


Function Encrypt(pwdStr AS String) As String
Dim i
Dim Cha

Dim retVal as String

For i = 1 To Len(pwdStr)
Cha = Asc(Mid(pwdStr, i, 1))
retVal &= Chr(((Cha Xor 111) + 32) Mod 256)
Next

Return retVal
End Function



Function Decrypt(pwdStr As String) As String
Dim i
Dim Cha

Dim retVal as String
For i = 1 To Len(pwdStr)
Cha = Asc(Mid(pwdStr, i, 1))
retVal &=Chr(((Cha - 32 + 256) Mod 256) Xor 111)
Next
Return retVal
End Function

--Brian Desmond
Windows Server MVP - Directory Services
http://www.briandesmond.com
belete
Asp.Net User
Re: Compilation error6/27/2004 10:01:45 AM

0/0

Thank U
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Windows Vista Annoyances: Tips, Secrets, and Solutions Authors: David A. Karp, Pages: 641, Published: 2008
C++ how to Program: How to Program Authors: Paul J. Deitel, Pages: 1429, Published: 2008
Learning GNU Emacs: UNIX Text Processing. Authors: Debra Cameron, Bill Rosenblatt, Eric Raymond, Pages: 533, Published: 1996
Writing Excel Macros with VBA: Learning to Program the Excel Object Model with VBA Authors: Steven Roman, Pages: 549, Published: 2002
Webmaster's Guide to the Wireless Internet Authors: Ryan Fife, Wei Meng Lee, Pages: 0, Published: 2001
Visual Basic 2005: How to Program Authors: Harvey M. Deitel, Pages: 1513, Published: 2006
Java Servlet Programming Authors: Jason Hunter, William Crawford, Pages: 753, Published: 2001
VBScript Programmer's Reference: Programmer's Reference Authors: Adrian Kingsley-Hughes, Daniel Read, Pages: 773, Published: 2007
Java in a Nutshell Authors: David Flanagan, Pages: 1254, Published: 2005

Web:
Compilation error - Wikipedia, the free encyclopedia Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors from the compiler itself, ...
Compilation error From: Ricardo Valdivia ; To: pgsql-admin(at) postgresql(dot)org; Subject: Compilation error; Date: Tue, 15 Sep 1998 18:30:08 ...
ASP error "VBScript compilation error '800a0401'" When you view an ASP page using View > Live Data, or Preview in Browser, the following error occurs:. Microsoft VBScript compilation Error '800a0401' ...
Compilation Error Messages | ejabberd Community Site Compilation Error Messages. Submitted by badlop on Thu, 2006-02-02 15:22. -- prefix does not work (ejabberd 1.0.0 and older) · Erlang Configure Crashes on ...
scons Compilation error: msg#00366 Previous by Thread: problem with compilation..., jérémie HUYGHE. Next by Thread: Re: scons Compilation error, Julien Gilli ...
Explains that you receive a "Compile error in hidden module" message when you start Word or Excel. Provides a resolution.
Compilation Error occur with the add tab example Compilation Error occur with the add tab example 2003-01-21 07:53:37 Bob DuCharme [Reply] After saving the source document in temp.xml and the stylesheet in ...
Compilation error Sep 24, 2007 ... Message boards : API : Compilation error ... I am unable to compile the boinc sample files, getting this error, g++: /usr/local/lib/libGLU.a ...
Nabble - stdcxx-user - stdcxx compilation error stdcxx compilation error. Hello, I try to compile this code with stdcxx (code which compile with gcc + gccstl). I don't understand why I get an error void.
Compilation error - Club CDFreaks - Knowledge is Power If anyone here has some free time on their hands, I keep getting a trivial compilation error when trying to make the a file from the following website: ...

Videos:
Mount & Blade - "Sons of Odin" Music video featuring the game Mount&Blade to the song "Sons of Odin" by Manowar. Decently synced but had to repeat some clips at the end thanks to a...
Alliance Productions Compilation I know the quality is very poor in this, this is also a rendering error. This will be rectified soon. If you want to do it justice, I recommend downl...
Lost Mistakes Compilation ( Season 3, Episode 1-3) Lost Mistakes (Season 3) from Episode 1 - 3.
Overflow-Error - Watching Waiting (Live 19-05-2006) (Video Compilation) Een video die is opgenomen tijdens het laatste optreden van de Nederlandse band 'Overflow-Error'. Het optreden was in 013 (Tilburg) op 19 mei 2006.
Lavazza Viva Italia 2008 - Complete festival compilation The italian car festival was held on the TT circuit of Assen and featured among many others: Ferrari F40, 360CS, Bugatti EB110 SS, Lamborghini Diablo...
SSBM BTT Records Compilation 2:56:95 Music is a Melee sound montage by William Walden downloaded from the fan site www.ssb-experience.com . PM me your e-mail and I will send it to you. ...
The Lubavitcher Rebbe on Israel's Security (Note: This version has a slight error in the subtitles. To see the corrected version, click on "more from user" and select the video from March 12, ...
Poesie Noire - Compjutr Syntax Error Complicated Compilated 84-89 Label: Antler-Subway Catalog#: AS 5024 CD Format: CD, Compilation Country: Belgium Released: 1990 Genre: Electronic, E...
Violence Compilation 2: Disturbed - Down with the Sickness READ THIS PARAGRAPH BEFORE WATCHING:This video contains mostly fictional/staged violence/aggression (by 'aggression' I mean periods of time without a...
Brawl Combo/Compilation Video Sorry, I overlooked the credits error, instead of running 1 long credits somehow it ran the same credits twice, you just have to read them twice as f...




Search This Site:










save data in database

containers question (skinning)

default.aspx - not showing event

masterpage in seperate assembly

ttt forum can't add new thred

set email address as username

allowdefinition='machinetoapplication' error

system.web.caching mia?

internet explorer won't display my page

sorting data

can't login to sql and i think it's a security issue on server...

making queries to the db that personalization provider is using?

client site validate

how to sort a sortedlist

3.0.6 issue - generate language pack

issue w/ using an array of a valuetype as a member property of a custom server control

vs2005 wdp, no vista?

playing movie in web page?

advanced login / redirect

where are the events?

findcontrol and masterpages

return the id of the row when a checkbox is clicked

clear textbox 'after' gridview displayed

v2 installation

matt fleitz, about your software download

com addin in microsoft project using vb.net

digital signatures

label & html formatted text

how to merge “google maps” within asp.net 2.0 application?

freetextbox ??

 
All Times Are GMT