This topic is locked

how to pass Data

3/31/2008 10:33:39 PM
ASPRunnerPro General questions
M
mrkuwait author

Hi,

Can you please tell me how to pass the data from one page to the other in the old asprunner3, I use to do something like this:
page that is generated by asprunner I use to enter this:
<%

if IsBinaryField(rsData.Fields("Cust Number")) then

Response.Write CreateImageControl(rsData, "Cust Number")

else

Response.Write ProcessLargeText(GetData(rsData.Fields("Cust Number"), ""))

end if

%>
</td>
<TD>

<b>

<%

name2 = ProcessLargeText(GetData(rsData.Fields("Cname"), ""))

phone2 = ProcessLargeText(GetData(rsData.Fields("DSL No"), ""))

Link2 = ProcessLargeText(GetData(rsData.Fields("Link IP"), ""))

Port2 = ProcessLargeText(GetData(rsData.Fields("Source Slot/Port"), ""))

Dslam2 = ProcessLargeText(GetData(rsData.Fields("From/At Location"), ""))

%>
<a href="http://localhost/index.asp?name=<%=name2%>&phone=<%=phone2%>&Link=<%=Link2%>&Port=<%=Port2%>&Dslam=<%=Dslam2%>"></a>;
<%
if IsBinaryField(rsData.Fields("Cname")) then

Response.Write CreateImageControl(rsData, "Cname")

else

Response.Write ProcessLargeText(GetData(rsData.Fields("Cname"), ""))

end if

%></td><TD><%
and on the othere page where I wanted it this code:
<%response.write request.querystring("Name")%>
but in version 4 I cant do all this please help me on how to do it...

J
Jane 4/1/2008

Hi,
to pass value from ome page to another save value in the Session variable and then use this variables on the another page.

M
mrkuwait author 4/1/2008

Hi,

to pass value from ome page to another save value in the Session variable and then use this variables on the another page.


Im sorry i didnt get you... A sample example will be a great help.

Sergey Kornilov admin 4/1/2008

Page 1:
Session("SomeVariable") = "Some value"
Page 2:
Response.Write Session("SomeVariable")

M
mrkuwait author 4/2/2008

Page 1:

Session("SomeVariable") = "Some value"
Page 2:
Response.Write Session("SomeVariable")


its not sending the customer name to the page2.

Session("SomeVariable") = "Some value" <--- Anything i write here it sends. i want it to send the listed customer form thr list page.
' Cname - Hyperlink

value=""

value = GetData(rs,"Cname", "Hyperlink")

row.Add col & "Cname_value",value

Session("Cname") = [what should I type here which value]

J
Jane 4/3/2008

Here is a sample:

' Cname - Hyperlink

value=""

value = GetData(rs,"Cname", "Hyperlink")

row.Add col & "Cname_value",value

Session("Cname") = value

M
mrkuwait author 4/6/2008

Here is a sample:



oK tried it. when I search I get a list of customers.

but when I click on a customer and the 2 page openes. now in the second page it does not show the customer name the one I clicked on. it picks customer name from page 1 though but the one last in the list. and not the one i click on

? I have spent more than 40 hours on this and still cant understand how to do it.. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=27673&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />

M
mrkuwait author 4/6/2008



oK tried it. when I search I get a list of customers.

but when I click on a customer and the 2 page openes. now in the second page it does not show the customer name the one I clicked on. it picks customer name from page 1 though but the one last in the list. and not the one i click on

? I have spent more than 40 hours on this and still cant understand how to do it.. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=27675&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />


IF I search by name and sinlgle customer appears it works well... or you can say Great. BUT

if you list or make a search where you have more than one. then it picks information of the last customer in that list to the 2 page. which is reay bugging me...
please help me on how to resolve this issue..

M
mrkuwait author 4/7/2008
J
Jane 4/8/2008

Declare Session("Cname") as empty string before cycle and save all values in the Session("Cname") value.

Session("Cname") = ""

while not rs.eof and recno<=PageSize

...

Session("Cname") = Session("Cname") & value

...

wend

M
mrkuwait author 4/8/2008

Declare Session("Cname") as empty string before cycle and save all values in the Session("Cname") value.



Tried it. it takes everyone from the search list and adds them on the page2 <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=27757&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />

I just want to add the one I click on...

M
mrkuwait author 4/8/2008

wend ??
where to add this ? because I see its already there..
Set rowinfo = CreateObject("Scripting.Dictionary")

shade=false

recno=1

editlink=""

copylink=""

ri=0

Set fso = CreateObject("Scripting.FileSystemObject")

Session("Cname") = ""

Session("Phone") = ""

while not rs.eof and recno<=PageSize

Set row = CreateObject("Scripting.Dictionary")

if not shade then

row.Add "shadeclass","class=""shade"""

row.Add "shadeclassname","shade"

shade=true

else

row.Add "shadeclass",""

row.Add "shadeclassname",""

shade=false

end if

col=0
while not rs.EOF and recno<=PageSize and col<1

col=col+1
' key fields

row.Add col & "id1",my_htmlspecialchars(dbvalue(rs("Cust Number")))

row.Add col & "recno",recno

recno=recno+1

' detail tables

' edit page link

editlink=""

editlink=editlink & "editid1=" & my_htmlspecialchars(SafeURLEncode(dbvalue(rs("Cust Number"))))

row.Add col & "editlink",editlink
copylink=""

copylink=copylink & "copyid1=" & my_htmlspecialchars(SafeURLEncode(dbvalue(rs("Cust Number"))))

row.Add col & "copylink",copylink

keylink=""

keylink=keylink & "&key1=" & my_htmlspecialchars(SafeURLEncode(dbvalue(rs("Cust Number"))))
' SO # -

value=""

value = ProcessLargeText(GetData(rs,"SO #", ""),"field=SO+%23" & keylink,"",MODE_LIST)

row.Add col & "SO___value",value
' Cust Number -

value=""

value = ProcessLargeText(GetData(rs,"Cust Number", ""),"field=Cust+Number" & keylink,"",MODE_LIST)

row.Add col & "Cust_Number_value",value
' Cname - Hyperlink

value=""

value = GetData(rs,"Cname", "Hyperlink")

row.Add col & "Cname_value",value

Session("Cname") = Session("Cname") & value

' Connection Type -

value=""

value = ProcessLargeText(GetData(rs,"Connection Type", ""),"field=Connection+Type" & keylink,"",MODE_LIST)

row.Add col & "Connection_Type_value",value
' DSL No - Hyperlink

value=""

value = GetData(rs,"DSL No", "Hyperlink")

row.Add col & "DSL_No_value",value

Session("Phone") = Session("Phone") & value
row.Add col & "show",true

rs.MoveNext

wend

rowinfo.add ri,row

ri=ri+1

wend

smarty.Add "rowinfo",rowinfo

rs.Close

end if

J
Jane 4/9/2008

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error and your order number.

I'll find what's wrong with your project inspecting it at Demo account site.

M
mrkuwait author 4/15/2008

What you told me works

But the thing is when you click on show all in list.asp page

you get a list of users or data.

Now my case is I have customers and in list.asp page, you click on [Show all] and you see list of customers with hyperlink on them, when i want to open a trouble ticket I will simply click on the customer and the Page2 opens where hes name should appear and i can simply click on Print.

BUT the case is using session thingy you told me this is what happens
I click on show all and I get a list e.g 10 customers.

if I click on customer no.1 or no.5 in the list it passes the last customer in the list no.10 and not the one I clicked on.
It takes everyone from the list.asp page1 to page2

I just want to add the one I click on...

If I search and find one. and click on it. works well, but when theres a list, it takes the last one from it.

Please Help......