Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 23rd, 2004, 09:52 PM
Registered User
 
Join Date: Nov 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tonjaw
Default variable name

i'm sorry for opening new thread which i had started in another forum. i just wanna get replies asap.

i have a problem like this. is it possible to declare a variable which its name based on iteration?
this can be done in PHP with a simpe script:

Code:
For($i=1; $i<4; $i++){
   ${"strRead{$i}"} = ${"chkRead{$i}"}
}
with the above script, we got variables $strRead1, $strRead2 and $strRead3.

i'm pretty sure that .net has its way to do it. i cannot use an array because these variables will be used in web form control.


thanx in advance,
tonjaw

_____________________
Dominus Tecum
 
Old October 24th, 2004, 05:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you explain in more detail what you want? I am not entirely sure what you're trying to accomplish.

And why can't you use an array in a Web control? You can do pretty much what you want in the code (behind) of a control.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Split into fractions by Curve (Track 7 from the album: Doppelganger) What's This?
 
Old October 25th, 2004, 02:41 AM
Registered User
 
Join Date: Nov 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tonjaw
Default

i tried to generate web control based on a dataset row. and u are right imar. i was wrong and finally i could figure it out by using an array.

anyway thanx for ur attention imar. really appreciate it :)

_____________________
Dominus Tecum





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object variable or With block variable not set haidee_mccaffrey Classic ASP Professional 5 March 8th, 2007 03:34 PM
ASSIGNING A JAVA SCRIPT VARIABLE TO A XSL VARIABLE SOMANATHAN10 XSLT 1 February 21st, 2007 04:26 AM
object variable or with block variable not set Aoude BOOK: Beginning VB.NET Databases 1 February 24th, 2006 05:21 PM
Object variable or With block variable not set tparrish Pro VB Databases 1 May 25th, 2005 02:08 PM
Object variable or with block variable not set spacy ASP.NET 1.x and 2.0 Application Design 0 September 21st, 2004 12:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.