|
I would agree!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I am a total virgin with protocols so I may be off, but i'll explain to the best of my knowledge.
http is a stateless (non persistant protocol) this means it's impossible for a website to hold it's previous state, so using a variable defined in JScript from ASP on the server is impossible. I guess you could consider the following a work around for this short fall:
Use cookies...
Save the variable to cookie using JSCript and access it from ASP using cookies again.
Also...can you not send your variable as url encoded...?
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Any good place where I can put my ASPX web page?
Thanks
Al
|
|
|
|
|
Here's a list of hosts on GotDotNet.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I am at my wits end trying to get a proper Catalog going in Index Server.
I managed it once, but cannot recreate that feat.
I have a folder under the wwwroot folder called thewebsite . Under that are many folders, only two of which I want to be searchable, contents and resources . The files I want searchable are .xml, .doc, and .pdf files.
I set up my Catalog, point it at the website. When I check Index Server though it says that there are 208 documents to index and the Catalog size is 0 and the word lists are 0. That naturally is bad (the number of documents are right though.)
I have tried adding the Directories themselves to the Catalog, but no luck (though at first IS added a whole bunch of it's own directories and coloured them differently, they worked though!)
Does anyone have a step-by-step guide to creating a frigging Catalog for Index Server to search a website?
(p.s. sometimes the Catalog works, through blind luck I believe, but then the VPath property does not come through (tracking is set properly).)
My wits are ending!
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
|
why won't the following work?
<%
var buffer;
buffer = Request.QueryString("aValue");
Session("BufferValue") = buffer;
%>
or even
<%Session("BufferValue") = Request.QueryString("aValue");%>
I am trying to get a value passed in to a page (which works OK) and then store it in a Session variable so that it can be accessed by another page later. The error meesage I get says something like:
"can't store an Intrinsic Object in a Session variable"
Looks pretty good to me but perhaps I'm still in the C++ mindset!
Any help would be appreciated - thanks.
code dope.
|
|
|
|
|
mmm very weird, I've used the same code line and it worked fine. Are you sure that the server supports the Session object?
- Dan
"Intel inside - Idiot outside"
|
|
|
|
|
thanks for your reply..
yes I think so, because if I give it a string literal:
e.g. <%Session("BufferValue") = "A string literal";%>
it works fine!
It gets used on a Form on another page, which, again, works fine if I give it the string but not the variable, as follows:
<FORM>
...other stuff
<input type=hidden name= FName value=<%=Session("BufferValue")%>>
</FORM>
Unfortunately though I can't give it a string.
thanks again for your help
code dope.
|
|
|
|
|
code dope wrote:
can't store an Intrinsic Object in a Session variable"
Looks pretty good to me but perhaps I'm still in the C++ mindset!
Any help would be appreciated - thanks.
You cannot use buffer as a variable name as it is an "intrinsic object" (whatever that means.) Check out Response.Buffer
So just change buffer to something else, like strBuffer etc.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
thanks , Paul.
In fact, I wasn't using "Buffer" as my variable name - I just used that here because the actual names are not meaningful unless you know what the project is all about, and, for various reasons, I am not allowed to make that public knowledge.
However, I will try using various names just in case I have stumbled across something that is "Intrinsic!!" (whatever that is!)
thanks again - I'll let you know what happens.
code dope.
|
|
|
|
|
No, it didn't work.
I tried this:
<%
var thingy;
thingy = Request.QueryString("A_Value")
Session("Batch")= thingy;
%>
and got this:
"An intrinsic object cannot be stored within the Session object."
By the way, the return from "Request.QueryString("A_Value")" is just a character string - actually it's a File name with nothing other than numbers and letters, so there shouldn't be a problem there.
any more ideas?
code dope.
|
|
|
|
|
Maybe this is an array? For example if you have several INPUTs with same name attribute? Try to use like Request.QueryString("value")(1) (dunno exactly how in Javascript, maybe it starts from 0?)
Well, just another thought
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
i love you forever & want to have your babies!!!!
only kidding!
IT WORKED! I changed the code to:
<%
strValue = Request.QueryString("A_Value")(1);
Session("Batch")= strValue;
%>
Seriously though, thanks a lot for your suggestion. And everyone else who had a go. I was really getting ****ed off with it. It looked as though the assignment to the Session variable was the culprit, when it was actually not getting the value from the Query String. Strange, though, because I use that line to get the value from the Query string in several other places and it never fails. Oh well, who cares!!!
Thanks again.
code dope.
|
|
|
|
|
Oh well, I'm glad it is working now
Wasn't sure because of differences between Javascript and VBScript (I'm using the last one to write ASP)
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
strOpen= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db10.mdb"
'cnn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db10.mdb"
Set rst = Server.CreateObject("ADODB.Recordset")
strSQL= "SELECT * FROM Students"
rst.Open strSQL,strOpen,adOpenKeyset ,adLockOptimistic
Response.Write rst.RecordCount & " "
/// I always get record count as -1
// Why cant I just use RecordCount property
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
look up the CursorType property in MSDN and set it appropriately before doing the open. here's a link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprocursortype.asp
jscript would be something like this:
rs = Server.CreateObject( "ADODB.Recordset" );
rs.CursorType = 1; // <--- set this correct
rs.Open( sCmd, con );
// then rs.RecordCount should work
|
|
|
|
|
adOpenKeyset
when i use this adOpenKeyset this is according to MSDN should allow me to count records. But OK I'll try using 1 instead adOpenKeyset
Thanks
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
Right, but with client side cursor.:
rec.CursorLocation = adUseClient
and you don't have to use Keyset. The best way to boost performance is to use Client-side cursor (adUseClient ) with forward-only and read-only recordset (adOpenForwardOnly, adLockReadOnly )
and RecordCount works fine with such Recordset
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
It's a good plan to disconnect the recordset first, otherwise your page will have too much of a chatty relationship with the DB and your performance will be less than good.
Cheers,
Simon
X-5 452 rules.
|
|
|
|
|
Good reference, but couldn't open most of links
I tried Perl links for example
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
While I'm all for the free sharing of information, many of these ebooks are copies of books still on the market (and thus copyrighted).
I doubt Anonymous has received permission to place them online.
Not to be a party pooper, but I think Charles Petzold deserves every royalty check he's ever received for his Programming Windows books.
Let your conscious be your guide when visiting
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
I wanna develop a web control which acts like Panel but has its special behavior. According to .net framework reference, ReadWriteControlDesigner allow drop child controls into the control.
But when perform a drop operation on my control with designer derives from ReadWriteControlDesigner, VS issue "The operation could not be completed".
What's going on? Is there any special method, event to be overided?
Any response should be appreciated.
|
|
|
|
|
I wanna assign a tool box bitmap to my own Web Server Control, and my source code just like following:
...
[
...
ToolboxBitmap(@"imagepath\image.bmp"),
...
]
public class mycontrol : WebControl
...
It does work at design time, that is the default "gear wheel" icon is replaced by the new image(but the background is not transparent).
When i run the app, system issues a "Unable find imagepath\image.bmp" error.
Can you help me to resolve this problem ?
Thanx.
|
|
|
|
|
1) name the bitmap with the same full ( namespace+classname ) name as the webcontrol
1a) i've heard that the bottom left hand cornor pixel is marked as the "transparent color" for the icon.
2) set the following attribute:
ToolboxBitmap( typeof( Bitmap ) )
this means that the toolbox icon will be embeded in the assembly as a bitmap with the same name as the control.
if you are in visual studio...
3) add the bitmap to the project
4) set the compile type to embeded resource
if not
3) add the following arg to the compile command line
/resource:"C:\path\to\my\bitmap.bmp"
now when you compile it... you should see it in the toolbox.
|
|
|
|