client-side

User Control with Client + Server Side CustomValidation; Wrong Client side validator is picked

余生长醉 提交于 2019-12-11 14:24:17
问题 I have a user control which contains a CustomValidator which is used according to whether a RadioButton is checked or not (there are several RadioButtons, I'm only showing the relevant one) <asp:RadioButton runat="Server" ID="RadioBetween" GroupName="DateGroup" CssClass="date_group_options_control_radio" /> <asp:TextBox ID="FromDate" runat="server" Columns="8"></asp:TextBox> <asp:TextBox ID="ToDate" runat="server" Columns="8"></asp:TextBox> <asp:CustomValidator ID="DateValidator" runat=

Persistence in a JavaScript module

拈花ヽ惹草 提交于 2019-12-11 13:37:17
问题 I need to write a JavaScript module that rotates banner images displayed in a SharePoint web part. I would like to rely on SharePoint APIs as little as possible, and keep as much as possible self contained in the JavaScript module that drives the web part. I would like to keep track of the last time my code advanced to the next image in a list, and what that image was. The list will itself will be persisted in SharePoint and available through the REST API. So, in the modern browser JavaScript

Why are browsers allowed to display client-side source code?

霸气de小男生 提交于 2019-12-11 13:13:33
问题 Why are browsers allowed to display source code for HTML/CSS/JavaScript files? I've been told that obfuscation is not the ultimate answer to provide protection. So once the code is sent to the client-side, anyone can steal the front-end data? Can't all popular browsers provide a password mechanism so that unauthorized users can't see the source code? Companies invest a lot of time, money, and other resources in developing professional sites, yet it seems there is a lot of business out there

client side validating dynamically generated form elements in mvc 3.0

喜你入骨 提交于 2019-12-11 11:43:48
问题 I have read a lot about how to validate dynamically generated content in mvc 3.0 such as the one xhalent has written , But I cant understand how to use it in my code. I mean it does not work for dynamically generated form elements. Here is my Model classes: public class Person { [Required] public string Name { get; set; } [Required] public string Phone { get; set; } public IList<Address> Addresses{get;set;} public Person() { Addresses = new List<Address>() { new Address(){Street="1"},new

Resize image and then upload it to server using bootstrap-fileupload plugin

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 09:26:05
问题 I am trying to upload the converted version of some image files on client-side with bootstrap-fileupload plugin for a custom view. In my search, I came up with this question, and pretty much figured out how to upload a file using a custom tag with ASP.NET. Now what I want to do is to resize that image file before the upload (as some image files may be > 15MP - which equals to > 5MB per file) to the server. Everyone is talking about Plupload, but that one has its own design interface and

run threads on server side & show progress on client side possible?

喜你入骨 提交于 2019-12-11 09:01:13
问题 I want to run a thread pool on server side & want to show threads work progress on client side. Is this possible. If so kindly guide me. thanx in advance 回答1: Yes, in the main thread check for updates (or get notified by the worker threads) and then send the report progress over TCP Sockets (or using interprocess communications if on the same machine). On the client side parse the information when you receive it, and update the GUI/Progress accordingly. 来源: https://stackoverflow.com/questions

What TCP protocols are usable for client to client communication?

元气小坏坏 提交于 2019-12-11 08:30:40
问题 Manytimes clients ask for features like instant messaging (IM) and other client-to-client (P2P) communication for their web apps. Typically how is this done in normal web browsers? For example I've seen demos of Google Wave (and Gmail) that are able to IM from a regular browser. Is this via HTTP? Or does XmlHttpRequest (AJAX) provide the necessary backend for such communication? More than anything I wonder how can a server "wake up" the remote client, lets say for sending an IM? Or does the

Facebook api friends list

杀马特。学长 韩版系。学妹 提交于 2019-12-11 08:27:48
问题 I'm using Facebook's javascript SDK to inspect the friends list of users registered in my application. I have this call: FB.getLoginStatus(function (response) { if (response.status == 'connected') { FB.api('me/friends', { fields: 'id, first_name, picture', limit: 6 },function(response){ MY CODE TO VIEW FRIENDS PICTURE }); } else{ CODE TO GET ACCESS_TOKEN } }); but in most of cases I get an api error like this: response.error = { message: unkown error, code: undefined, type: http, subcode:

Client Side option append to asp.net DropDownList Control and ViewState Prorblem

我们两清 提交于 2019-12-11 08:25:00
问题 Is there any way of appending options to an asp.net dropdownlist control and viewstate at the same time? My dropdownlist is empty when the page is loaded then I am appending options from client-side code. I have implemented cascading dropdownlist function and I used JQuery for that. At fist I was using AjaxControlToolkit CascadingDropdown control and it can do that but don't know how. any idea? 回答1: Appending options to a drop down list control will not reflect on the code behind, because you

Javascript grayscale script for images hosted in the cloud

老子叫甜甜 提交于 2019-12-11 07:54:47
问题 I am wondering if there is a way to make an image grayscale/b&w client side using javascript when the files are hosted on, say, AWS s3 or something. I have found this nice little script: http://www.permadi.com/tutorial/jsCanvasGrayscale/index.html But when you try to apply this to images that are not hosted on the same domain, you get a Security Error because you're performing cross-site operations. The exact error (from Chrome) is: Uncaught Error: SECURITY_ERR: DOM Exception 18 In particular