|
Context.Request.ServerVariables["REMOTE_ADDR"]
HTH
|
|
|
|
|
Hi, is possible to know with a var if a images from a url as "http:/direc.com/img.gif" exist? how could i know if this image exists ?
thanks
|
|
|
|
|
Set a IMG tag to the source you indicate above. In the image tag I believe you can specifiy onload.
In onload check the WIDTH/HEIGHT properties. If they're not Zero the image exists.
Note: If I remember correctly an IMG won't return HEIGHT/WIDTH properties if the IMG tag is hidden.
I used this approach in a form submission to check the size of an image on the client before uploading, it should work for you too..
Cheers
How do I print my voice mail?
|
|
|
|
|
Hi! In wich language are you coding???
I'll assume you're coding in C#. I'll assume also you want to know if the file exists in a remote Internet address.
<br />
Uri uri = new Uri("http:/direc.com/img.gif");<br />
<br />
try<br />
{<br />
System.Net.WebRequest wr = System.Net.WebRequest.Create(uri);<br />
wr.GetResponse();<br />
}<br />
catch(UriFormatException e)<br />
{<br />
}<br />
Hope is usefull to you!
Mariano, el estupefacto.
//TODO: Make this damn code work!
|
|
|
|
|
I've created a web service which read a web page (an .htm file) using HttpWebRequest, and HttpWebResponse classes. The Internet connection go through a proxy server. The problem I encountered was that it returned cached content rather than update-to-date content. It's the same for the browser. When I type in the URL in the browser, it also return a cached page. However, it can be resolved by pressing the refresh button to requery the web site. The question is, does anyone know how can I programmatically force to refresh the web page in my web service to simulate the same behavior?
|
|
|
|
|
Hi There,
I have an ASP.NET page. I open a child window using the JavaScript function. When the parent closes, the child closes. When the parent refreshes, it loses the variable name of the open child window. So, I can't do anything with it afterwards. I know that you can use a hidden frame to keep track of the variables. Is there any way to maintain functionality without using hidden frames?
Thanks in advance.
Emanuel
|
|
|
|
|
I have a small web application that allows a user to enter a description into a textbox. The description looks something like this:
'The car is blue and costs £5,000. What a bargain.'
When the user presses submit the value entered into the textbox is assigned to a string.
Once the page has reloaded the '£' symbol has disappeared. I have tried it with other currency symbols and they work fine. Please can somebody tell me why the '£' symbol does not assign to the string and if there is a work around.
Thank You
|
|
|
|
|
how do i make a web page expire and send the user back to the login screen i'm useing csharp with asp.net
thanks
chad
|
|
|
|
|
in the web.config set the "timeout" attribute of the sessionstate element. eg.
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />
will expire the session after 20 minutes.
hope this helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Hi,
As well as the above solution, if you wanted the page to automatically navigate back to the logon screen (say if someone left the page open for too long), then insert the following meta tags in your HTML pages
<html>
...
<meta http-equiv="Refresh" CONTENT="600; URL=http://my.site/login.aspx">
...
<body>
...
This would navigate back to the login page after 10mins has elapsed.
Hope this helps,
Andy
|
|
|
|
|
Actually I need to do Drill Down Crystal Report.
For Ex 10 Master Records are there.TEST1,TEST2 like that
If I click TEST1,It should display TEST1 detail Record (It is in Another Report)Help met to do.
radha
|
|
|
|
|
Yes, u can link sub reports based on some criteria.
U should use some other discussion forum for product specific questions.
cool man
|
|
|
|
|
hi all i am using dreamweaver to create an asp site and i ve too questions
1- how can i validate a date enterd in a textbox
2- how can i make the password confirmation part whiel a user wants to change his/her password.
these might be a piece of cake but its making mw go crazy
|
|
|
|
|
Your first question:
3 options...
1) Use a JS date picker control so it's entered one way always and only...still have to check that on the server side though eh...
2) Manually parse (splitting on a period or slash) and run some basic checks.
3) Use regex or existing library/framework...like http://www.dithered.com/javascript/form_validation/usage.html[^]
As for your second question...i'm not clear what exactly you want...???
Prompt the user using javascript like
var ret = prompt("Are you sure you want to change your password");
if(ret){
location.href = "pwd_chg.php?newpwd="+oForm.pwd;
else
alert("Password change aborted!!!");
}
How do I print my voice mail?
|
|
|
|
|
A quick'n'dirty solution to validate a date on the server side:
/* needed to parse DateTime-Values (for Germany) */
protected IFormatProvider culture = new CultureInfo("de-DE", true);
protected string[] expectedFormat = {"D", "d"};
/***********************************/
private bool ValidateDateString(string dateString) {
try {
DateTime validationDate = DateTime.ParseExact(dateString,
expectedFormat, culture, DateTimeStyles.AllowWhiteSpaces);
}
catch {
return(false);
}
return(true);
}
|
|
|
|
|
Dear all,
I would like to display real time data ( from sensors ) on the web.
The refresh rate I would like to achieve is 1 Hz. I have got solution using the meta refresh HTML, but it is not convenient for refresh rate smaller than 1 minute.
Any idea/advise ? any direction to look at ? Web service or web form ?
Thanks for help,
loic
|
|
|
|
|
What kind of language are you going to use? A web service sounds like a good idea, but you will not get away with only that. The refresh rate might need some Java script involved as well.
Niklas Henricson
|
|
|
|
|
The script perferms the following. There are three levels. Company -> Project -> Task
The objective is to be able to click on Company/Project to expand/hide the child nodes. Currently I have been able to get this functionality; however, a problem as arisen. When you click on task it should have no effect, but instead the expand/hide function is triggered for the parent node.
Please view my same code here:
http://www.airvisionadventures.com/XML/task.html[^]
A list of all files (XML, XSL, JS, CSS) are listed here:
http://www.airvisionadventures.com/XML/[^]
Please let me know if you have any suggestions.
|
|
|
|
|
I should have know. The problem was bubbling. I have heard about it but have never come accross a situation where I needed to control it. Anyways, for anyone who is interested a good article is located here:
http://wdvl.com/Authoring/JavaScript/Events/bubbling.html[^]
So, basicly I needed to add an extra onclick action to the last DIV node (onclick="event.cancelBubble = true"). This prevents the browser from bubbling up to the parent div tag and running the onclick action associated with it. I hope this helps someone!
|
|
|
|
|
I develop my web application in using Ms Visual Studio.NET 2003, OS - Windows XP, Web Server - IIS 5.1.
My web application (using ASP.NET, VB) is connect to Access database.
Now, I have deploy it and try to run it in the Windows 2000 Platform, with IIS 5.0.
Why my web application failed to perform on the necessary task like, edit, update, and delete?
Is that mean my web application got some bugs or something?
Please advice.
|
|
|
|
|
Uhm... Developing a web application in one enviroment and migrating it in another isn't really recommended, but that is just my opinion (I had personally problems once when I developed ASP.NET under Win 2000 and migrating it to Windows XP after). To me it sounds like if IIS or .NET Framework would be the issue. Have you tried to build your application in Win 2000 instead?
Niklas Henricson
Sweden
|
|
|
|
|
I haven't.
As I'm building my web application in WinXP, IIS 5.1, so I have tried on Windows 2000 Professional.
What is your suggestion?
Regards,
Aaron
|
|
|
|
|
In my case I had problems with my .NET framework so I had it reinstalled.
What error message do you get in Windows 2000 when you try to run your application?
Niklas Henricson
|
|
|
|
|
Hie,
Finally, my problem is solved.
Thank you very much, Niklas.
Regards,
Aaron
|
|
|
|
|
Niklas Henricson wrote:
To me it sounds like if IIS or .NET Framework would be the issue. Have you tried to build your application in Win 2000 instead?
Building the Solution under Win 2000 would not help as the code will still compile to the same MSIL, only when the code is JIT-compiled will the differences between platforms occur.
I would think the problem is more to do with security permissions than anything else.
Niklas Henricson wrote:
problems once when I developed ASP.NET under Win 2000 and migrating it to Windows XP after
Windows XP has a much tighter security model that Windows 2000, and now with SP2 it is tighter still. I've had problems migrating from W2K to XP but they were all security related. Recompiling the code on the new platform made no difference.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|