|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Member
Iscritto dal: Oct 2005
Messaggi: 290
|
[ASP] variabili nella collection Session
ciao raga!
avrei il seguente problema con due pagine scritte in asp (e javascript) che vengono eseguite in locale su IIS (ho come sistema operativo windows xp professional sp2): la prima pagina (la chiamerà in seguito 1.asp) contiene un form in cui inserire la quantità desiderata di un certo prodotto, tale valore viene poi pasato via post alla seconda pagina (2.asp) la quale mostra un riepilogo della scelta fatta ma permette, premendo un bottone, di tornare nella pagina precedente con il campo del form preimpostato al valore scelto precedentemente. In 1.asp ho il seguente codice: Codice:
<input maxlength="10" size="10" name="fd"
<%
var n_fd = Session("qty_fd");
if(n_fd != null){
Response.write("value=\"" + n_fd + "\" >");
}else{
Response.write(">");
}
%>
Codice:
<%
var price_fd=0.5;
var qty_fd=0;
var qty=Request.Form("fd")
if( qty!="" && isFinite(qty) ){
qty_fd= parseInt(qty);
}
Response.write(qty_fd);
Session("qty_fd") = new String(qty_fd);
%>
Codice:
<%
Response.write("<p>FD:"+ Session("qty_fd") +"-</p>");
%>
infine se non metto Codice:
Session("qty_fd") = new String(qty_fd);
Codice:
Session("qty_fd") = qty_fd;
Codice:
# Error Type: Session object, ASP 0168 (0x80004005) An intrinsic object cannot be stored within the Session object. io veramente non so che pesci pigliare ah se può esservi utile vi copio il codice completo di entrambe le pagine! grazie mille in anticipo...
__________________
_______________________________________________ AMD Athlon64 3500+, Cooler Master Hyper 6, Asus A8V Deluxe wifi-g Rev2.0, Corsair TwinX-1024 Pc3200XL Platinum, Western Digital Raptor 74GB, Cooler Master CoolDrive 4, Sapphire Radeon 9600XT 256MB, Sound Blaster Audigy Player, Cambridge Soundworks 4.0, Enermax Coolergiant EG485p/ax, Lg Flatron L1952S --- Acer Aspire 5024 ![]() Apple MacBook Pro 13" 2.53GHz Ultima modifica di VendeR : 10-04-2008 alle 18:22. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Mar 2007
Messaggi: 7863
|
posta il codice presente nel bottone che fa il back e nel Page_Load delle 2 pagine!
|
|
|
|
|
|
#3 | |
|
Member
Iscritto dal: Oct 2005
Messaggi: 290
|
Quote:
Codice:
window.location.replace("1.asp");
Codice:
<%
var qty_fd=0.0;
var qty = String( Request.Form("fd") );
if( qty != ""){
if( isFinite(qty) ){
qty_fd = parseInt(qty);
}
}
Response.write(qty_fd);
Session("qty_fd") = qty_fd;
%>
__________________
_______________________________________________ AMD Athlon64 3500+, Cooler Master Hyper 6, Asus A8V Deluxe wifi-g Rev2.0, Corsair TwinX-1024 Pc3200XL Platinum, Western Digital Raptor 74GB, Cooler Master CoolDrive 4, Sapphire Radeon 9600XT 256MB, Sound Blaster Audigy Player, Cambridge Soundworks 4.0, Enermax Coolergiant EG485p/ax, Lg Flatron L1952S --- Acer Aspire 5024 ![]() Apple MacBook Pro 13" 2.53GHz |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 13:30.




















