tags:

views:

10

answers:

1
<%
dim req_id
req_id=Request.Form("Req_id")


Set conn=server.CreateObject("adodb.connection")
conn.Open session("Psrconnect")
Set rs=CreateObject("Adodb.Recordset")
rs.Open "select * from releases where project like '%"&req_id&"%'", conn

%>
<SELECT style="LEFT: 454px; WIDTH: 500px; TOP: 413px" name="txtrelease1" id="txtrelease1">
<%
    if rs.EOF=true then
%>  
        <OPTION value="NO Request to Edit">No Request to Edit</OPTION>
<%  else

        do while rs.EOF<>true
        p=InStrRev(rs.Fields(0),"\")
        q=Len(rs.Fields(0))
        r=(Right(rs.Fields(0),(q-p))) %>
            <OPTION value=<%=rs.Fields(0)%>> r </OPTION>
<%  
            rs.movenext
        loop
    end if
%>

</SELECT>

i want to right the value of r in the dropdown list. i dont know the syntax. as of now the drop down list shows "r" , not the value inside it. how to do it?

A: 

This should do it:

do while not rs.EOF
    p=InStrRev(rs.Fields(0),"\")
    q=Len(rs.Fields(0))
    r=(Right(rs.Fields(0),(q-p))) 
%> 
    <option value="<%=rs.Fields(0)%>"><% =r %></option>
<%
    rs.moveNext
loop
egrunin
yeah. thanx a lot
sushant
You're welcome. Now 'accept' my answer and we'll both be happy :)
egrunin