Web Development Information |
|
Functions and Subroutines in ASP
Functions and Subroutines in ASPIf you read our Tutorial on Include Files (SSI) then you learned how to encapsulate ASP code within include files and the benefits it brings us. Function getBalloon(strColour) Dim Tempstr strColour = lcase(strColour) 'This converts the value lowercase. Select Case strColour Case "red" Tempstr = "Here is your red balloon" Case "yellow" Tempstr = "Here is your yellow balloon" Case "green" Tempstr = "Here is your green balloon" Case "blue" Tempstr = "Here is your blue balloon" Case Else Tempstr = "Sorry, we have sold out of that Colour" End Select getBalloon = Tempstr End Function %> A Function is passed some information. The information we pass a Function, is known as an 'argument'. The information we get back from a Function is known as the 'return value'. Whilst a Function can have many arguments, it can only have one return value. Function calcTax(amount, taxrate) Dim Tempvar Tempvar = amount * (taxrate / 100) CalcTax = Round(Tempvar, 2) 'round the result to 2 decimal places End Function %> Again, another basic example. We should notice this time that the Function accepts two arguments. shoppingbill=goodsTotal + calcTax(goodsTotal,17.5) Response.Write "Your shopping came to Ł" & goodsTotal Response.Write " VAT amount = Ł" & calcTax(goodsTotal) Response.Write "Total Amount Due = Ł" & shoppingbill %> Above you see the example function in action... easy huh! Sub Bday(strName, intAge) Response.Write "Happy Birthday " & Name Response.Write ", You are " & intAge & " years old today" End Sub 'now, call the sub bDay "Joe",26 %> The above Sub, demonstrates my point. We put something in, it performs an action (in this case writing to the screen), but nothing is returned to us in the code. One thing that REALLY IS important when using a sub, is that we do not put brackets around the arguments... Because we do not have a return value we do not need brackets and in this case, if we try we will get an error. Rob Collyer, experienced with 20 years programming knowledge and site administrator of www.webforumz.com - Copyright 2003-2004
MORE RESOURCES: You Don't Need a CSS Framework InfoQ.com 5 Companies Hiring Developers Built In New Tech Courses That Have Just Landed KDnuggets Why (and How) I Learned Web Development as a Data Scientist Towards Data Science GoDaddy Join’s Upwork Marketplace for Developers Silicon Valley Daily My Sublime Text Setup in 2024 for Web Development Laravel News LaunchUX Wins Prestigious UpCity National Excellence Award for Web Development and SEO for Second ... Franklin County Free Press Charlotte ad agency AC&M Group acquires Argentina web development company Axlot The Business Journals 9 Chicago Web Design and Development Agencies To Know Built In Chicago Best web development tool of 2024 TechRadar 11 of the Best Web Development Agencies in New York + Tips on How to Choose the Best Agency Influencer Marketing Hub Best Linux distro for developers of 2024 TechRadar Best Python Course (2024): Top Udemy Crash Courses & Coding Bootcamps Reviewed by Compare Before Buying Markets Insider How Much does Website Development Cost in 2024? Appinventiv Top 32 Web Development Agencies For All Things Technical Influencer Marketing Hub Innovation, Science and Economic Development Canada | Official site Innovation, Science and Economic Development Canada Launch Code recruiting applicants for its free web development course KTVI Fox 2 St. Louis From Data Scientist to AI Developer: Lessons Building an Generative AI Web App in 2023 Towards Data Science Small Business Website Design Tips - Marketing Business.com Free Python Full Stack Web Development masterclass in Hyderabad The Siasat Daily 38 Web Development Stats You Should Know in 2024 Influencer Marketing Hub 15 Highest Paying Countries for Web Developers Yahoo Finance Top 16 eCommerce Web Development Companies To Grow Your Sales Influencer Marketing Hub Can AI-Powered Tools End the Web Developer Shortage? Spiceworks News and Insights Choosing the Right Framework for Java Web Development BOSS Magazine Web Developer: Best Low-Stress, High-Pay Job in America? Dice Insights Best PHP Frameworks for Web Development in 2024 Simplilearn TSTC Marshall spotlights online web design and development program Marshall News Messenger Netlify Announces Software Developer Kit (SDK) to Accelerate Modern Web Development for Enterprises PR Newswire How to Use Node Js for Backend Web Development Simplilearn Are you up to build the next best website? Get started with one of these 5 web design courses Fortune What is MERN Stack? All You Need to Know Simplilearn Leaked: New Web Development Tools from Google AI Business 6 ways AI is changing web design Creative Bloq Navigating the world of eCommerce web development for small businesses Arizona Big Media Watch this web developer dismantle vintage computers Technical.ly Best laptops for programming of 2024 TechRadar |
RELATED ARTICLES
10 Things You Should Be Monitoring On Your Website Every business needs to know how it is doing. That's the idea behind exit surveys, customer feedback forms, suggestion boxes and other devices. Make Your Own Website - General Website Design Tips Wow, we`ve already taken a domain and chosen a web host. Great job ! Now it`s time for something special: making your own website. Are You Overlooking the Benefits of Using Sub-Domains within Your Web-hosting account? One of the most useful features offered by some web hosting companies, is the option of creating sub-domains in the same web hosting account. The problem is, most website owners are not aware of why and how to create sub-domains. In Business? 10 Reasons Why You Need a Website -- Now! 1) Word of Mouth The single most powerful form of new business creation is word of mouth. Your past customers, friends, acquaintances and staff aren't likely to carry your brochure or even your business card everywhere they go. How to Build a Database Driven Web Site If you ever want to create a state directory, articledirectory, dating site or link directory, you need to know aboutcreating database driven web sites. This may seem like adaunting task at first, if you have never done it, howeverI was in the same boat as you. Up The Sandbox! Go to any internet marketing forum you want these days andone of the topics is sure to be whether or not there is a"sandbox" at Google where new sites are forced to come andplay for 3-6 months before joining the ranks of ranked andsearched results. On the surface it would appear that thisis so. Better Web Site ROI: Efficient Online Business with SEO, PPC, Split Testing, and Forums If you're looking for better web site ROI, chances are, the web is only one part of your business, you have a specific budget for your web site, and you want the site to not only carry its own weight, but why can't it make you some extra dough, too?The corporate situation: budgets need to be closely watched, and tech people can't get carried away with unnecessary frills.My own experience making money online and becoming and SEO expert was more guerilla than corporate. Top 7 Tips for Building an Antique Car Website Like wine cars get more attractive to collectors as years pass by. The fact is there are only a finite number of cars made in the world in any model and make. Instant Relevant Web Site Content - No Its Not a Bot In about the Time it takes to Watch a Reality TV Show (About 1 Hour) I added 10 Pages of Relevant Content to my Web Page without a Bot.Adding content to your Page Fast is Easy with the Use of Free Articles you Can Reprint. The Number 1 Reason Most Websites Fail Failure, just like success, is measured differently by each and every one of us. What one man treats as success another may view as failure. Lead Generation How to -- 10 Tips On Generating More Internet Sales Leads Many millions of dollars are being wasted on promoting and sending traffic to ineffective lead generation websites. Here are my top 10 tips to make your site generate more leads for you and your company. What Does An Ex-Basketball Coach Know About Pulling Web Metrics? In my previous life.. How Disabled Users Access The Internet In 1995 a new era of accessibility for disabled people began. The Disability Discrimination Act was passed, stating that:"It is unlawful for a service provider to discriminate against a disabled person by refusing to provide any service which it provides to members of the public. User Interface Design: Key to Achieve Best Web Development From early days of www, the Internet sites that are added day by day are increasing tremendously. When you will consider this pool of web, may be they are about computers, industry, entertainment, search engines, fashion, organizational or even individual, all of these sites are concerned about one major part of web development apart from the logic or programming efforts behind it is 'User Interface Design'. 50 Ways To Use Your Website A website is the most versatile and cost-effective marketing tool on the market. It is also an investment. The Cost Of A Web Site Just starting out, you can start with a simple informational site, which is all most need initially, and build up to a fuller site (e-commerce and/or interactive) when you can afford it.Your goal should be to get an online presence. Be Creative Before You Purchase Or Create A Website Before you jump into spending coutnless hours on designing and publishing your website, or spending hundreds on having it done by anyone else you should plan out your full design (or structure). This is very important so that when it comes time to do this long-lasting project you will be well prepared. Creating Websites that Cater to Exam Preparations One of the things that Internet excels is disseminating information and knowledge across many brains and continents. In this global economy the aspirations of the younger generation is not bounded by countries or continents. UK Online Shopping with an Edge, for Buyers and Sellers Alike Any new website competing on the internet, needs to take its business seriously, as there is so much competition around. So, there needs to be an edge on quality, content, and general user appeal. How to Create a Professional Web Site in 24 Hours While creating a Web site may seem like a difficult, time-intensive and expensive process, it's actually possible to have a professional site up and running in less than 24 hours for under $50 with little to no prior Web development experience. And whether your business sells products or services, you can use a Web site to increase your revenue and reduce your start-up costs. |
home | site map |
© 2006 |