ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #31  
Old March 9th, 2006, 04:46 PM
Rust Indy Rust Indy is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 31 Rust Indy User rank is Private First Class (20 - 50 Reputation Level)Rust Indy User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 12 h 41 m 14 sec
Reputation Power: 4
It should be noted that enabling Parent Paths creates a potentially damaging security problem. Unless you are the only one writing ASP code on your server, or you know you can trust everyone who writes ASP code on your server, they should be disabled.

http://support.microsoft.com/default.aspx?scid=kb;en-us;332117

Reply With Quote
  #32  
Old June 15th, 2006, 11:45 AM
JonathonD JonathonD is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 51 JonathonD User rank is Sergeant (500 - 2000 Reputation Level)JonathonD User rank is Sergeant (500 - 2000 Reputation Level)JonathonD User rank is Sergeant (500 - 2000 Reputation Level)JonathonD User rank is Sergeant (500 - 2000 Reputation Level)JonathonD User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 h 48 m 16 sec
Reputation Power: 9
Nice advice...
Comments on this post
Shadow Wizard disagrees: silly comment made only to boost post count. you could click the scales and say this - and this kind
of posts is typical for you I fear.
freeasphelp disagrees!
D.O.M.I.N.A.T.O.R disagrees!

Reply With Quote
  #33  
Old June 17th, 2006, 10:18 PM
freeasphelp's Avatar
freeasphelp freeasphelp is offline
Beyond The Impossible
ASP Free Novice (500 - 999 posts)
 
Join Date: Sep 2003
Location: Shawnee Mission, KS, USA
Posts: 921 freeasphelp User rank is Corporal (100 - 500 Reputation Level)freeasphelp User rank is Corporal (100 - 500 Reputation Level)freeasphelp User rank is Corporal (100 - 500 Reputation Level)freeasphelp User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 25 m 9 sec
Reputation Power: 8
Parent Paths can be enabled on just one site or all sites its your choice.
__________________
John Shepard
Beyond The Impossible
-----------------------------
Has a post helped you? Please show your apprecitation by clicking the
image in the right upper corner.
Posting code? Put your code between [code] and [/code] tags.
X-Login and X-Send

Reply With Quote
  #34  
Old June 21st, 2006, 12:48 PM
MARKEDAGAIN's Avatar
MARKEDAGAIN MARKEDAGAIN is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Nov 2004
Location: Montreal
Posts: 668 MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level)MARKEDAGAIN User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 6 Days 7 h 4 m 19 sec
Reputation Power: 25
hey guys , great advise all arround.

although i did find it a bit annoying to go threw each post 1 by 1 so i figured i make a pdf of this thread.

I will always try to keep the pdf updated if there is new posts.

M.
Comments on this post
Shadow Wizard agrees: that's really great Mark, thanks!
PhilCollins99 agrees: Extra effort is always worth recognition!! You're the first person to receive 11 reputation points
from me. ;D
Attached Files
File Type: pdf Things You Should Know _ASP.pdf (41.5 KB, 525 views)
__________________
Mark
If you found a post particularly helpful, show your appreciation by clicking the "scales" icon in the bar just above the post, at the right hand side.

Reply With Quote
  #35  
Old June 11th, 2007, 08:11 AM
asfia asfia is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2007
Posts: 27 asfia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 50 m 42 sec
Reputation Power: 0
Where is WEB EXTENSIONS??? i cant seem to find anything saying "web extensions"..

Reply With Quote
  #36  
Old June 12th, 2007, 06:45 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
Quote:
Originally Posted by asfia
Where is WEB EXTENSIONS??? i cant seem to find anything saying "web extensions"..
what post you mean?

Reply With Quote
  #37  
Old July 9th, 2007, 02:31 PM
sebs sebs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 135 sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 48 sec
Reputation Power: 14
Tips & Tricks

Not sure if it's been done here before, since I'm new, but it's always nice to see people's trick and tips for coding in asp.

Here's a few from moi:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Checking if a string is empty:

-> If strMyString = "" Then 'This is slow
-> If Len(strMyString) = 0 Then 'This is faster
-> If LenB(strMyString) = 0 Then 'This is the fastest


Naming variables:

-> Use meaningfull name, a name that will describe the variable.
-> Use a prefix. I usually use the three letters. str = String, int = Integer, obj = Object, cur = Currency, etc...


Querying Database:

-> Open your database as soon as possible and close as soon as possible
-> I usually do my database query at the top and put everything in a two dimentional array (using arrMyRecords = rs.getRows) so my connection can be closed right away


Pre-select Dropdown options:

-> Put the whole list of option (<option value=""abc"">abc</option>) in a string
-> To preselect, do Replace(strMyList, "<option value=""" & strMyValue & """", "<option value=""" & strMyValue & """ selected") , that way you do no need to do 'if then' in every loop.


Menu/items in an array:

-> If you need to put a menu in an array, using position is not very user friendly when you need to update it. If you need to re-organized or remove one, you will have to update all the position, instead, do an array of arrays:

arrMenu = Array(_
Array("Menu 1", "url1"), _
Array("Menu 2", "url2"), _
Array("Menu 3", "url3"), _
Array("Menu 4", "url4") _
)

Then you can loop by doing:

For Each menuItem In arrMenu
strMenuName = menuItem(0)
Next


I'll think about more...

Reply With Quote
  #38  
Old July 9th, 2007, 03:15 PM
mehere's Avatar
mehere mehere is offline
Senior Sarcasm Wizardess
ASP Free God 17th Plane (13000 - 13499 posts)
 
Join Date: Feb 2005
Location: Dreamland
Posts: 13,237 mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)mehere User rank is General 15th Grade (Above 100000 Reputation Level)  Folding Points: 10976 Folding Title: Novice Folder
Time spent in forums: 5 Months 1 Day 20 h
Reputation Power: 2012
Thanks for posting ... I have merged this into an existing thread we have. Please post other tips here.
__________________
Come JOIN the party!!!

Quote of the Month:
Pretension: The downside of being better than everyone else is that people tend to assume you're pretentious.

Questions to Ponder:
You can be overwhelmed and underwhelmed, but why can't you be simply whelmed?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright© 2008 sbenj69

Reply With Quote
  #39  
Old July 9th, 2007, 08:27 PM
sebs sebs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 135 sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level)sebs User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 48 sec
Reputation Power: 14
Quote:
Originally Posted by mehere
Thanks for posting ... I have merged this into an existing thread we have. Please post other tips here.


Thanks, I was wondering where it went...

Here's a few more that I use frequently:


Post data form to form

Code:
For intX=1 To Request.Form.Count
	Response.Write "<input type=""hidden"" name=""" & Request.Form.Key(intX) & """ value=""" & Server.HTMLEncode(Request.Form.Item(intX)) & """>"
Next


Paging Recordset + Array

Code:
'cITEMS_PER_PAGE is the number of rows per page
'intStartAtRow is where to start extracting
'intCurrentPage is the cursor you move from page to page, default is 1

'do you usual database stuff here

intStartAtRow = cITEMS_PER_PAGE * (intCurrentPage - 1)

If Not rs.EOF Then
	rs.Move = intStartAtRow
	
	If Not rs.EOF Then arrResults = rs.getRows(cITEMS_PER_PAGE, adBookmarkCurrent)
End If

'close db connection
'arrResults is now a two dimensional array that hold your records


Inserting related record in db
For example, you have a product and you want to select all the categories that it goes in:

Code:
'Put all categories in a dropdown (with multiple select) or in checkbox, put the id in the value and name it category_ids
'Then for saving:

intProductID = Request.Form("product_id")

'open db

'this line is when you're editing
Set rs = conn.Execute("DELETE FROM products_categories WHERE product_id=" & intProductID)			

'adding related categories only if there is some selected
If LenB(Request.Form("category_ids")) > 0 Then 
	Set rs = conn.Execute("INSERT INTO products_categories (product_id, category_id) SELECT " & intProductID& ", id FROM categories WHERE id IN (" & Request.Form("category_ids") & ")")
End If

'close db

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Things You Should Know


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
Stay green...Green IT