Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 April 18th, 2007, 10:29 AM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default reading and incrementing a value

i have this code through which i'm reading hosts names from a file and displaying it into the dropdown menu .Now say i select for example a value "1.2.3.4" from the menu then i want that under "PORT" i should see say for ex :18000 ,Now when i choose another value from the menu "2.3.4.5" then the value in the PORT should by itself increment the previous value to say 19000 .How can i do that ? Plz help !! Let me know if more info is needed on this .
here is the code :

<td><select name="t_host" size="1" id="t_host" style="width:170px">
<% Set fs=Server.CreateObject("Scripting.FileSystemObject ")
     Set f=fs.OpenTextFile(Server.MapPath("defaults1/hosts.dat"),1)
        do while f.AtEndofStream = false
        strLine = Trim(f.ReadLine)
        If Len(strLine) > 0 Then
response.write "<option value=""" & Replace(strLine,"""",""") & """>" & strLine & "</option>"
        End If
        loop
        f.Close
        Set f=Nothing
        Set fs=Nothing
    %>
    </select></td>
<tr><td>&nbsp;PORT</td>
<td><input type="text" name="t_port" id="t_port" class="textboxNormal"></td>
</tr>







Similar Threads
Thread Thread Starter Forum Replies Last Post
Incrementing the variable value Swetha XSLT 2 April 28th, 2008 04:43 PM
Incrementing numbers RubyRue ASP.NET 1.0 and 1.1 Basics 2 January 30th, 2008 12:16 AM
Incrementing a value within a template Tre XSLT 1 March 21st, 2007 09:31 AM
For Loop Not incrementing donrafeal7 Javascript 1 October 24th, 2006 12:24 AM
incrementing value of a variable akibaMaila VB.NET 2002/2003 Basics 4 July 5th, 2005 12:04 PM





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