|
Hi Folks..
Im calculating an impt variable called "querystring" in asp_page1.asp..Now if i have to transfer this value to asp_page2.asp
How do i use the response.redirect method..
I have tried response.redirect
1). "asp_page2.asp?querystring"
2). "asp_page2.asp?@querystring"
3)."asp_page2.asp?!querystring"
but none of them worked..How do i pass the value that i get at one page for my variable to the other.
Luv
Pradhip.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
I'm trying not to be too critical but this is such a basic question you really should do some research before looking for help here.
|
|
|
|
|
Using JScript:
Response.Redirect("asp_page2.asp?querystring=impt&nextval=impt2");
You could put it into the session too.
ed
Someday we'll look back on this moment and plow into a parked car.
Evan Davis
|
|
|
|
|
Searched and searched and really tried to find the answer. I've give you a hint, look at the URL that got you here.
|
|
|
|
|
Hey there,
I'm having a problem with ASP.NET cookies for an article I'm working on (for CP). I want to check if a client has a cookie called "LastVisit" and use it's Expires property to determine if the user visited a page within the last n minutes. If the cookie is not expired I want to take one action, if it is expired, I want to update the time the cookie expires and allow the user to continue normally.
I thought this would be easy, but I'm having problems. I can create the cookie and set its Expires property, but cannot seem to read it back. I'm using the HttpCookieCollection.Count property to figure out if the client has any cookies and then attempting to read the "LastVisit" cookie if Count==1. This is where the problem is: I cannot update the value of the Expires property using the following code :
HttpContext.Current.Response.Cookies.Item("LastVisit").Expires=DateTime.Now.Add(new TimeSpan(0,0,0,20));
Response.Cookies.Add(HttpContext.Current.Response.Cookies.Item("LastVisit"));
Any suggestions?
Thanks!
Erik Westermann
Author, Learn XML In A Weekend (Fall 2002)
|
|
|
|
|
Never mind ... got it
Erik Westermann
Author, Learn XML In A Weekend (Summer 2002)
|
|
|
|
|
I want to be able to send a XML file to client (meaning the client will download it). I have a problem with the HTTP header that makes IE to display the file in its page instead of opening the window to download the file.
Here is my header:
HTTP/1.0 200 OK
Content-Type: text/xml
Content-Disposition: inline; filename=myfile.xml
Content-length: 10240
I "hacked IE" by modifying the extension in something it does not recognize (.abc) and it works, the file is downloaded. However this is not what I want.
Anyone could help?
Thanks.
Best regards,
Alexandru Savescu
|
|
|
|
|
Response.ContentType = "text/xml"
Response.AddHeader "content-disposition", "attachment; filename=myfile.xml"
[Optional:]
Response.AddHeader "content-length", [Size of file in bytes]
|
|
|
|
|
Thanks, it worked!
My problem was with "content-disposition" . I used "inline" instead of "attachment"
Best regards,
Alexandru Savescu
|
|
|
|
|
hi,
Any one knows how to execute the webmethod periodically in the web services?
Thanks in advance...
|
|
|
|
|
Please can you elaborate on this?
I'm not sure what you're looking at doing...
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
I'm trying to execute the webmethod automatically without using any scheduling agent.
|
|
|
|
|
Entry,
Can you give me a bit of background on this?
Is it possible that an event will get raised and this can then call your web service?
Using some kind of NT service might be your best bet. What's your reasoning for not wanting to use one?
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
SimonS,
I'm trying to access the remote database and update the data in web server's database. For this I'm using the web service. Is it possible that the web services automatically fetch the data periodically?
|
|
|
|
|
does anyone know how to check a client computers dot net version, or even if dot net is installed?
Any help would be nice. Thanks.
Brandon
|
|
|
|
|
Check the header information it should have something like ".NET CLR" in it if .NET is installed.
|
|
|
|
|
How do i do that?
Brandon
|
|
|
|
|
I'm presuming this is for the web?
If so, here's the server variable:
Key: HTTP_USER_AGENT
Value 0: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
I have a database folder above the root on my server,
and include file in header.asp that calls the database.
I use Server.MapPath("../db/db.mdb") and it works when I am
in default.asp, but if I go deeper in the path I loose
contact with the database, does anyone have solution to
this problem?
|
|
|
|
|
If you go one level deeper in the directory structure, you'll need to use ../../db/db.mdb . The best thing to do is create a virtual directory, then always refer to it like so in the header... /vdir/data/the.mdb .
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"The height of your accomplishments will equal the depth of your convictions."
- William F. Scolavino
|
|
|
|
|
Thanks Jeremy
I don´t know what I am doing wrong but its not working,
I made a folder above root called it "vdir" copied the
db folder in that and use /vdir/db/db.mdb with the mapPath
Can you descripe it better how I do this?
|
|
|
|
|
|
First off, I'm open to suggestions for a better solution to my problem, but I think that I may have an idea that will work.
Background:
I work heavily with web development on a corporate Intranet. Our company has ~300 employees. We recently gave all employees the ability to post their own news items on the Intranet Home page. The users manually type their name into a form field and their IP address is logged when they submit items. However, our network assigns users a new IP address when they log onto the system, and we have no way to track this back the the original person that made the submission. Basically, if they lie about their first/last name, we would have no way of figuring out whe the person actually is.
Problem:
We need a way of logging some information about the user so that we can easily track things back to them if needed. Here is my idea: All users are on Windows NT. Windows NT stores all cookies as the users Windows Logon (in my case "laquerr_chj@ourwebsitename"). If it is possible to read and record the file name of any cookie stored on the users machine, then the problem would be solved. I looked at many scripts on the web and could not find a way to do this.
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|
|
AFAIK the way cookies are implemented can be different from browser-to-browser. I've seen differences between IE and NS anyway. This may not be an issue, however, because if you are on an Intranet and it may be corporate policy to use a certain browser.
Regardless, I would not recommend using cookies at all for this. Instead, try using the AUTH_USER server variable to get the user that's currently logged in. This way, a user can hop on a different machine in the same domain or dare I say workgroup and still have their settings on the app.
I'm assuming you are using ASP, so the code for it will look a bit like so...
JScript<br />
<br />
var user = new String(Request.ServerVariables("AUTH_USER"));<br />
user = user.toUpperCase();<br />
<br />
VBScript<br />
<br />
Dim user<br />
user = UCase(Request.ServerVariables("AUTH_USER"))
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"The height of your accomplishments will equal the depth of your convictions."
- William F. Scolavino
|
|
|
|
|
I actually tryed to do this using Server Variables at first but ran into one problem. The value returned for "AUTH_USER" on my PC is empty. I think that this is because visitors are not logging onto the web page at any point... they are just an anonomous visitor as far as the site is concerned. The file name of the cookie that I referred to in my original post is pulled from the user's Windows Logon. It is something that is done by the user's PC rather than the web server.
I also took a look at all other Server Variables and was unable to find anything that was unique as well as easily tracable back to my machine.
Also, the cookie differences between browsers shouldn't be an issue in my case. I am working in a controlled Intranet environment, and everyone in the company is standardized on IE 5.5.
By the way, thanks for the quick response.
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|