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

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
 
Unread ASP Free Forums Sponsor:
  #16  
Old May 27th, 2005, 11:07 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 15th Plane (12000 - 12499 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 12,025 Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 12 h 15 m 14 sec
Reputation Power: 628
Quote:
Originally Posted by jobo
When I do this, I get the error "Operator '&' cannot be applied to operands of type 'string' and 'string'". --Joe

This is language dependent, VB.NET is &, C# is +

Reply With Quote
  #17  
Old June 8th, 2005, 12:35 AM
kishor_kurapati kishor_kurapati is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 kishor_kurapati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 19 sec
Reputation Power: 0
write the code test.aspx.vb

Like ASP you abl to write to write the code in test.aspx page
but writing the code in the test.aspx.vb is preferred in .NET

B,coz the code from the page test.aspx.vb is not scene by any one
i.e. when website is deployed all the code in test.aspx.vb is placed in a dll
so more security.

Reply With Quote
  #18  
Old July 6th, 2005, 04:00 PM
MaximusPrime MaximusPrime is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Cleveland, OH
Posts: 80 MaximusPrime User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 22 m 59 sec
Reputation Power: 5
Quote:
7) Avoid using Response.Write in ASP.NET. The ASP.NET rendering process takes place after the Response.Write would, you have no control over where the data is written to on the page (It appears at the top of the page, even above you <HTML> tag).


What do you suggest we use instead of Response.Write?

Reply With Quote
  #19  
Old July 6th, 2005, 05:07 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 15th Plane (12000 - 12499 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 12,025 Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 12 h 15 m 14 sec
Reputation Power: 628
What are you needing to display that you would need to use Response.Write?

Reply With Quote
  #20  
Old July 8th, 2005, 09:37 PM
gregory.owen@hp gregory.owen@hp is offline
Maniac
ASP Free Novice (500 - 999 posts)
 
Join Date: Sep 2003
Location: Sweet Home, Oregon
Posts: 598 gregory.owen@hp User rank is Sergeant Major (2000 - 5000 Reputation Level)gregory.owen@hp User rank is Sergeant Major (2000 - 5000 Reputation Level)gregory.owen@hp User rank is Sergeant Major (2000 - 5000 Reputation Level)gregory.owen@hp User rank is Sergeant Major (2000 - 5000 Reputation Level)gregory.owen@hp User rank is Sergeant Major (2000 - 5000 Reputation Level)gregory.owen@hp User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 14 h 46 m 46 sec
Reputation Power: 37
I use Response.Write during development to display debugging and troubleshooting information, but never in a production-ready application.

Reply With Quote
  #21  
Old August 9th, 2005, 12:17 PM
MaximusPrime MaximusPrime is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Cleveland, OH
Posts: 80 MaximusPrime User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 22 m 59 sec
Reputation Power: 5
In my case the question was answered in another post

Thanks

Reply With Quote
  #22  
Old October 29th, 2005, 02:17 AM
ALEX_GRIM's Avatar
ALEX_GRIM ALEX_GRIM is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 67 ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 35 m 19 sec
Reputation Power: 6
this is no breakthrough, but since i am new to this stuff, i was typing some things out the long way. now that i've figured out ways to improve my script, etc, i figured other people might like to save time typing so...

this:
Code:
SUB TRIM_COMMENTS

DIM CN668 AS OLEDBCONNECTION
DIM DA668 AS OLEDBDATAADAPTER
DIM DS668 AS DATASET
DIM CN66 AS OLEDBCONNECTION
DIM CM66 AS OLEDBCOMMAND
DIM CS66 AS STRING
dim RC AS INTEGER
CN668 = new OLEDBConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0;Data Source=Z:\WWW\DATA\MX.MDB") 
DA668 = NEW OLEDBDATAADAPTER("SELECT CTIME FROM COMMENT WHERE MYNAME='" & REQUEST.QUERYSTRING("UNAME") & "'",CN668)
DS668 = NEW DATASET()
DA668.FILL(DS668,("COMMENT"))


DIM CMS AS STRING = "DELETE FROM COMMENT WHERE MYNAME='" & REQUEST.QUERYSTRING("UNAME") & "' AND CTIME='" & THISTIME & "'"
CM66 = NEW OLEDBCOMMAND(CMS,CN668)
CN668.OPEN
CM66.EXECUTEnonquery()
CN668.CLOSE
CN668 = NOTHING

END SUB


can be done like this:
Code:
SUB TRIM_COMMENTS
DIM Con AS new OLEDBConnection(application("DBcon")) 
DIM DA_1 AS  NEW OLEDBDATAADAPTER("SELECT CTIME FROM COMMENT WHERE MYNAME='" & REQUEST.QUERYSTRING("UNAME") & "'",Con)
dim DS_1 as NEW DATASET()
DA_1.FILL(DS_1,("my_table"))

DIM CM_1 AS NEW OLEDBCOMMAND("DELETE FROM COMMENT WHERE MYNAME='" & REQUEST.QUERYSTRING("UNAME") & "' AND CTIME='" & THISTIME & "'",Con)
Con.OPEN
CM_1.EXECUTEnonquery()
Con.CLOSE
END SUB


... a lot less typing uh?

Reply With Quote
  #23  
Old October 31st, 2005, 12:35 PM
ALEX_GRIM's Avatar
ALEX_GRIM ALEX_GRIM is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 67 ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 35 m 19 sec
Reputation Power: 6
Tip: if your dropdownlist's VISIBLE text value is the same as it's FORM tag value parameter's value, you can leave out the text value, and the closing </option> tag.

instead of this:
Code:
<SELECT RUNAT="SERVER" NAME="ITEM_YEAR" ID="ITEM_YEAR" >
<OPTION VALUE="2005" >2005</OPTION>
<OPTION VALUE="2006" >2006</OPTION>
</SELECT>


you can do this:
Code:
<SELECT RUNAT="SERVER" NAME="ITEM_YEAR" ID="ITEM_YEAR" >
<OPTION VALUE="2005" />
<OPTION VALUE="2006" />
</SELECT>


Just something to save you time typing, and less for the parser.

Reply With Quote
  #24  
Old October 31st, 2005, 07:13 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
just for the record, your TRIM_COMMENTS method is wide open for SQL injection
attacks.... wise tip for .NET programming is to use the Parameters instead of
passing the value directly.

Reply With Quote
  #25  
Old October 31st, 2005, 07:53 PM
ALEX_GRIM's Avatar
ALEX_GRIM ALEX_GRIM is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 67 ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 35 m 19 sec
Reputation Power: 6
Well, i was just intending to show how to save time with the main body of a common task, but thanx for pointing that out, i didn't catch that myself, i see what you mean now and i will change it.

Reply With Quote
  #26  
Old November 1st, 2005, 09:19 AM
icrf icrf is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 36 icrf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 58 m 8 sec
Reputation Power: 6
I just made a database class that handles all the connection and encapsulation junk, makes life much easier.
__________________
Andrew - DevShed Perl Monkey learning VB.NET

Reply With Quote
  #27  
Old November 1st, 2005, 11:35 AM
ALEX_GRIM's Avatar
ALEX_GRIM ALEX_GRIM is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 67 ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level)ALEX_GRIM User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 35 m 19 sec
Reputation Power: 6
Wow, that's a really good idea, but how easy is it to do for us beginners? And do you know anywhere that a beginner can go to find documentation on how to make your own class?

Reply With Quote
  #28  
Old November 1st, 2005, 12:26 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 15th Plane (12000 - 12499 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 12,025 Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 12 h 15 m 14 sec
Reputation Power: 628
The ASP.NET tutorial has a simple DML (Data Manipulation Layer) class, that demonstrates how to create one.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Coding Tips For .NET


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 2 Hosted by Hostway
Stay green...Green IT