Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pass MsFlexgrid values to different ASP pages

Status
Not open for further replies.

Vamsi

Programmer
Apr 28, 2001
2
US
i had some textboxes and button(add) in my html page along with MSFlexgrid.when ever i enter the values in the textboxes and press add button the values are added into msflexgrid.like this i will add around 10 rows in MsFlexgrid.now i want to go to the next page where in i need to display the Msfexgrid values in to another Msflexgrid in new page .how is it possible.is it possible by session arrays.if so can u suggest how is it possible.
 
This is what I did in a TABLE, not sure if it will work for you.
------------------------------------
Parts on this Order   <%=RS2(&quot;Recs&quot;)%> <br>
Note: To Delete a part key in a Zero Quantity. Then click the 'View Final Order' button and it will be deleted.

</p>

<table border=&quot;1&quot; width=&quot;90%&quot; bordercolor=&quot;#0066FF&quot;>
<tr>
<td width=&quot;10%&quot; align=&quot;center&quot; bordercolor=&quot;#000000&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>QTY</font></td>
<td width=&quot;18%&quot; align=&quot;center&quot; bordercolor=&quot;#0066FF&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Part Number</font></td>
<td width=&quot;52%&quot; align=&quot;center&quot; bordercolor=&quot;#000000&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Description</font></td>
<td width=&quot;12%&quot; align=&quot;right&quot; bordercolor=&quot;#000000&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Price</font></td>

<tr>
<td width=&quot;10%&quot; align=&quot;left&quot;> </td>
<td width=&quot;18%&quot; align=&quot;left&quot;> </td>
<td width=&quot;52%&quot; align=&quot;left&quot;> </td>
<td width=&quot;12%&quot; align=&quot;right&quot;> </td>
</tr>
<%
If Not RS3.EOF Then
Do%>
<tr>
<td width=&quot;10%&quot; align=&quot;center&quot;>
<%PNum =trim(RS3(&quot;Part Number&quot;))%>
<p align=&quot;center&quot;><input type=&quot;text&quot; name=&quot;QTY <%=Pnum%>&quot; size=&quot;4&quot; value=&quot;<%=RS3(&quot;QTY&quot;)%>&quot;></td>
<td width=&quot;18%&quot; align=&quot;center&quot;>
<p align=&quot;center&quot;><%Response.Write RS3(&quot;Part Number&quot;)%></td>
<td width=&quot;52%&quot; align=&quot;center&quot;>
<p align=&quot;center&quot;><%Response.Write RS3(&quot;Description&quot;) %></td>
<td width=&quot;12%&quot; align=&quot;right&quot;>
<%If RS3(&quot;ListPrice&quot;) = 0 then
Price1 = &quot;Call&quot;
Else
Price1 = FormatCurrency(RS3(&quot;ListPrice&quot;),2,0,0,0)
End if%>
<p align=&quot;center&quot;><%Response.Write Price1%></td>
</tr>
<% RS3.Movenext
Loop Until RS3.EOF%>
<p><input type=&quot;submit&quot; value=&quot;View Final Order&quot; name=&quot;Final&quot;> To Add more parts use your BACK button

------------------------------
Then I used the following to get all the values on the receiving page. So the name of the item passed was the quantity and the partnumber itself and the value was the quantity.
Like so: (this is for a 2 part number order)
QTY+100200=6&amp;QTY+100205=1
So the name of the first textbox is QTY100200 with a value of 6 the second is QTY100205 with a value of 1.
Then I stripped of the QTY part to get the number. As Shown below.
--------------------------------
<% For Each name In Request.querystring%>
<%Item=name%>
<%If left(Item, 3) = &quot;QTY&quot; then%>

<%pnum=right(Item,len(Item)-4)%>
<%Qty=Request.querystring(name)%>
<%if len(Qty) > 1 then
for a = 1 to len(qty)
b = mid(Qty,a,1)
If asc(b) > 49 and asc(b) < 57 then
Qty1 = b
end if
next
Else
Qty1 = Qty
end if%>
<%If Qty1 = 0 then
' don't add part to list
else%>
<%Set RS1 = Conn.Execute(&quot;SELECT [STOCK_CODE], [Description], [SELLING_PRICE] FROM [Copy-PartMaster Lite] Where [STOCK_CODE] = N'&quot; &amp; pnum &amp; &quot;'&quot;)%>
<tr>
<td width=&quot;18%&quot; align=&quot;left&quot;><%=pnum%><input type=&quot;hidden&quot; name=&quot;QTY <%=pnum%>&quot; size=&quot;4&quot; value=&quot;<%=Qty1%>&quot;></td>
<td width=&quot;52%&quot; align=&quot;left&quot;><%=RS1(&quot;Description&quot;)%></td>
<td width=&quot;10%&quot; align=&quot;center&quot;><%=Qty1%></td>
<td width=&quot;12%&quot; align=&quot;right&quot;><%=FormatCurrency(RS1(&quot;SELLING_PRICE&quot;),2,0,0,0)%></td>
<%price = Qty1 * RS1(&quot;SELLING_PRICE&quot;)%>
<td width=&quot;18%&quot; align=&quot;right&quot;><%=FormatCurrency(Qty1 * RS1(&quot;SELLING_PRICE&quot;),2,0,0,0)%></td>
</tr>
<%Total = Total + price%>
<%End If%>
<%End if%>
<% Next %>
--------------------

Hope this helps
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top