Ensure That A Sub Doesn't Be Used By Two Clients?
Feb 16, 2010how can we ensure that a sub,it is not be used by two or more clients??
View 21 Replieshow can we ensure that a sub,it is not be used by two or more clients??
View 21 RepliesI need to include an offsite javascript file on my page, however I don't want it to be able to affect the performance of my site, in case the server where the javascript is on is down or not responding.
What I'd like to know, is if it's posible with javascript to make some sort of wrapper function to ensure that the page where the offsite javascript is hosted is responding within an acceptable timeframe.
I've considered adding the "defer" attribute to where I include the javascript, but that would as far as I know still leave the site hanging after the rest of the page is loaded.
If it's not possible to do in javascript are there any good alternatives?
My site is made C# asp.net.
I'm creating an ASP.NET application which uses Facebook Connect and fbml tags. It also uses the LinkedIn widget. When I run this app in any browser, there are no warnings and everything works. However, in IE, a message like this comes up:
Security Warning:
The current webpage is trying to open a site in your Trusted sites list. Do you want to allow this?
Current site:http://www.facebook.com
Trusted site:http://localhost
(same for LinkedIn.com). I know how to fix this from a client perspective and to stop the security warning showing up. However, is it possible to ensure this message doesn't come up as it could be off putting for users who don't know how to suppress this warning? I haven't tried uploading it to my webhost, so not sure if this message will appear for everyone in production. However, I always get it on my local machine.
(None of my pages use SSL, so I don't think that's the issue. I tried using FB's HTTPS urls but that didn't make a difference).
I've been working in asp.net webforms and I've been making a UserControl that depends on a small bit of javascript which is in an external file.
I want to be able to put a reference to the javascript inside the UserControl to ensure that it gets loaded on the page, but the problem is that the UserControl can appear multiple times on a page so I only want the script to be loaded with the first instance of the UserControl.
Is there an easy way to do this in ASP.NET Webforms?
I am doing a survey. so basically, i will send out an email with a unique link and the person clicks the link which directs them to my aspx page. that controls i use will be bound to a datatable.
first I will need to show their existing home and email address in a control.
then i will give them 4 checkbox's to tick a certain option. also, how can I ensure only one checkbox is ticked all the time?
I will need the checkboxes to be bound as well, to show the options they chose incase they load the page again after saving.
I have some classes which can't make assumptions about de used culture. These classes should always use CultureInfo.InvariantCulture. However, I can't set the thread's current culture to CultureInfo.InvariantCulture, because other classes rely on <globalization culture="auto".
Is there a way to ensure some classes always use explicit culture method calls (like: Convert.ToDecimal(value, CultureInfo.InvariantCulture)) instead of assumed culture (like: Convert.ToDecimal(value)).Maybe my question it's not 100% clear: I'd like to detect all methods which have an overload which uses CultureInfo, but also one without the CultureInfo which uses the CurrentCulture.This includes implicit casts of numbers to string:
decimal value = 1.0;
string displayThis = string.Format("Costs: {0}", value);
The goal is to make sure some classes/methods don't assume anything about CultureInfo.
I can remember reading something on this in a book but I can't remember. How do you ensure that certain graphics have been loaded to the users computer before any of the page is rendered?
View 2 RepliesI am developing web applications using csharp. How can I ensure that some records are not picked using sql. I have a table with records and its content differ from each other dot ".". Table is as follows
Student1 Details2 Details2
1 Musol School Books
2 Musol School Books.
3 Golpp Temo Books
4 Golpp Temo Books.
How can I select records without dot "."at the end only. For example
1 Musol School Books
3 Golpp Temo Books
I have used sql but I am not getting it. My sql is as follows
select * from studentDD where Details2 !=".%"
It is not working.
So the problem is the following :
i do have own user control. which has some javascript file in script tag included like this
<script type="text/javascript" src="../somefile.js" ></script>
or some javascript code directly on the ascx page. everything works if i place this control somewhere in aspx markup. but if i add this control to the page dynamically to some UpdatePanel place holder on postback (this is logic i can not alter), control renders itself and then i get js error message, which says that functions which are placed in somefile.js are not defined/are null. Why is this happening ? Is there anyway to force js including in this case.
the code amount is huge and i was not able to provide a simplified example with the same error,.
The script is included but somehow the functions are not defined. I'm novice to js, so is it possible that just the script is included but not executed, so the functions are not declared ???
The interesting is that if on some page my custom control is declared in aspx.
I'm working with the AJAXControlToolkit in an ASP.NET 3.5 application. I've got a textbox on the page to take the person's social security number, and I've put an masked edit extender and an masked edit validator, force the user to enter the whole SSN, but it doesn't work. I'm not sure what I'm doing wrong, or have left out. Here's the relevant code:
[Code]....
I have a standard createuserwizard control, which adds a new member to my membership database. All fine, except I need to ensure that the user checks the terms and conditions checkbox before the member is created in the code-behind page. I need this to be server-side, rather than client-side, so a javascript-reliant solution isn't a solution :)
The code-behind is like this:
[Code]....
The aspx code is like this:
[Code]....
how to add validation to the 'Terms' checkbox? I've tried a normal validator and custom validators but just can't get them to work at all.
What is the best way to ensure that events are rebound after an UpdatePanel callback?
function pageLoad(sender, args){
//bind events here.
}
or
use the .live(eventType, handler) method to initially bind the events
or
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function() {
//bind events here.
});
I am devloping web application using csharp on visual studio. I am asking for a tutorial or urls that is showing on how to ensure that in a password that is being typed in has special character like! * ^ $ and some Capital letters. So that if someone tries to type a password with including these characters and some capital letters it refuses to accept that passord
View 7 RepliesI would like to make the contents of a file uploaded to a web server unrecoverable after it has been used. My concerns are:
When the file is uploaded, is it stored in a temporary directory (e.g. Windows Temp directory) and how do I clear all traces from there? Can the contents of the file be written to virtual memory and how do I ensure it is not or remove the contents once written? If I encrypt the file, would I still have to worry about the contents being saved to the Temp directory, virtual memory or elsewhere before the file was encrypted? Can I perform a secure delete in all the concerned about locations (temp, virtual memory, any others) and how do I do this? Are there any concerns I have missed or an alternate way to achieve the stated goal?
I have a couple of standard ASP.NET web methods that I'm calling from javascript with a parameter that is of a custom class in form
[DataContract]
[KnownType(typeof(MyOtherSubclass))]
public class MyClass
[code]...
I have a WCF webservice that acts as a data provider for my ASP.NET web page. Throughout the web page a number of calls are made to the web service via the auto-generated ServiceClient. Currently I create a new ServiceClient and open it for each request i.e. Get Users, Get Roles, Get Customer list etc.... Each one of these would create a new ServiceClient and open a new connection.
Can I make my ServiceClient class a global or statically available class so that all functions within my ASP.NET web page can use the same client. This would seem to be far more efficient. Are there any issues with doing it this way? Any advice I should take into account when doing this? What happens if I make multiple requests to a client? Presumably it is all synchronous so it shouldn't matter if I make 1 or 50 calls to it?
As the title says I have a Win 7 64 bit dev machine, Win 2K3 32 bit production box and I run against Oracle 10g which Oracle clients do I need to run? Do I need to run the Oracle 32 and 64 bit clients? And if so what versions?
View 1 RepliesUser1 open the website did something the progress bar starts. User2 open the same website that progress bar needs to display here.
View 1 RepliesI am adding new clients to a database using ASP.net I want to check if the username the client has chosen is not already in use by another client and highlight the relevant input box and write a message to select a different user name if it is.
Is there way to write to a specific place in the HTML similar to innerHTM? I haven't been able to find such. Alternatively i guess I could try an interact with client side Java, or re-write the whole page.
When a user enters a value I want to check against the other values in the database before allowing the record to be inserted.
It is a nvarchar type column.
Is it best to use a unique constraint (if so, how) or what would be the way to programatically check to make sure this name does not exist. It is not a username, just a name value that will be used in routing.
How can I Ensure That Secure Content Is Served Over HTTPS Only (IIS 6.0)? when the certificate is installed. In other words how can I direct all the http request to https. For example when some type http://localhost it redirects to https://localhost.
View 2 RepliesWe're modifying an existing ASP.NET application. We added a Terms and Conditions page with an "Accept" button that stores that choice in the user's account data. We want to prevent the user from accessing any page when the user has not accepted the Terms and Conditions.
I think we want to do this by looking up the "accepted terms" value upon login and storing it in the session. Then we need to intercept every request and check for that session value. (If it's not there, we redirect the user to the Terms and Conditions page.)
Is the PreRequestHandlerExecute method the right place to put this check? This method also gets called on requests for stylesheets and images, so it doesn't seem like it was intended for this purpose.
I have an ASP.NET form for currency exchange requests. There are two text fields there: amount-source and amount-target.
One of them must be filled and only one.
How to implement this using Validators, if applicable?
We have an application running on IIS 6 which uses a custom HttpModule to rewrite urls. This works great (well done us) except in the case where the Context.RewritePath destination is a .php file. The php file is executed as expected, however the $_POST collection is empty meaning it cannot access any forms which are submitted to rewritten urls. The problem does not exist when rewriting to .aspx files as the Request.Form collection is fine.
My question therefore has two parts: Why is the $_POST collection not being populated?
Is there a way to ensure that the .php $_POST collection is correctly populated after a rewrite?
I don't have much to show in the way of code. There's just a simple:
context.RewritePath(newPath);
once the HttpModule has figured out where to send the request.
Edit: Interestingly, if I do var_dump(file_get_contents('php://input')); in the PHP file (method described here) the contents of the form is displayed. So the data is reaching the PHP script but not the $_POST array.
I am developing a web applications. The application was intially done in Visual studio 2003 using csharp. then it was upgraded to visual stduio 2008. Now there is one webpage with 3 files with following extentions (.aspx,.aspx.cs,.aspx.resx) I right clicked on file to convert it web application but it is just the same. The main problems I have with this file as follows;
When I put a text control on form (.aspx) it is compiling with out any error but when I want to use the same control on aspx.cs it is not being recognised. How can I slove this problem?
Second when I do changes on aspx.cs file there not being recognised although there is no error when I compile.