client-side

Validate String Array In ASP.NET MVC in client side

拟墨画扇 提交于 2021-02-20 05:13:01
问题 This is my first post. I need string array validation such like below. [Required(ErrorMessage = "Content name is required")] public string[] ContentName { get; set; } I found a post which has the same situation. This answer and following code helped me so much and I could solve my problem. public class StringArrayRequiredAttribute : ValidationAttribute { protected override ValidationResult IsValid (object value, ValidationContext validationContext) { string[] array = value as string[]; if

Validate String Array In ASP.NET MVC in client side

白昼怎懂夜的黑 提交于 2021-02-20 05:09:15
问题 This is my first post. I need string array validation such like below. [Required(ErrorMessage = "Content name is required")] public string[] ContentName { get; set; } I found a post which has the same situation. This answer and following code helped me so much and I could solve my problem. public class StringArrayRequiredAttribute : ValidationAttribute { protected override ValidationResult IsValid (object value, ValidationContext validationContext) { string[] array = value as string[]; if

Validate String Array In ASP.NET MVC in client side

[亡魂溺海] 提交于 2021-02-20 05:08:57
问题 This is my first post. I need string array validation such like below. [Required(ErrorMessage = "Content name is required")] public string[] ContentName { get; set; } I found a post which has the same situation. This answer and following code helped me so much and I could solve my problem. public class StringArrayRequiredAttribute : ValidationAttribute { protected override ValidationResult IsValid (object value, ValidationContext validationContext) { string[] array = value as string[]; if

How would I design a client-side Queue system?

回眸只為那壹抹淺笑 提交于 2021-02-18 10:58:07
问题 OVERVIEW I'm working on a project and I've come across a bit of a problem in that things aren't happening in the order I want them to happen. So I have been thinking about designing some kind of Queue that I can use to organize function calls and other miscellaneous JavaScript/jQuery instructions used during start-up, i.e., while the page is loading. What I'm looking for doesn't necessarily need to be a Queue data structure but some system that will ensure that things execute in the order I

Extracting EXIF data with JavaScript

强颜欢笑 提交于 2021-02-08 19:54:29
问题 I'm evaluating image upload techniques using Canvas for a mobile web app. The sticking point is reading EXIF data client-side. Other discussions on this site point towards the excellent Blueimp JavaScript Image Load . I particularly want to extract from EXIF: date & time of photo taken Geopositioning - latitude & longitude of photo taken Testing the Blueimp script on Firefox v.33.1 on Windows Vista using a photo taken on an iPhone (with geo data), it successfully extracts all the EXIF data

how to send values from javascript to server side(asp.net)?

泄露秘密 提交于 2021-01-28 11:20:29
问题 What is the best way to send values from JavaScript (client-side) to the server (asp.net) without refreshing the page? I want to insert the data into a database but I don't want to refresh the page or change any data on it. 回答1: Ypu have to use Ajax techniques, JQuery, Asp.net, YUI, and the rest of api and libraries that let you use Ajax techniques. The easiest one in Asp.net is using builtin Asp.net Ajax functionalities by adding a ScriptManager and UpdatePanel to your page 回答2: Simple way :

How to sharpen an image in CSS?

江枫思渺然 提交于 2020-12-29 04:01:31
问题 If I have an image loaded from an arbitrary URL (local or remote), and do not want to use javascript nor server-side processing, is it possible to sharpen it from client-side with CSS? 回答1: Yes , for some browsers this is already possible (like Chrome and Firefox). In particular, you need mix-blend-mode and CSS filters. Here's a codepen with the Lenna image as example, and a (compiled) copy of it as a code snippet: .foo, .bar, .bar::after, .baz { width: 512px; height: 512px; position:

How to sharpen an image in CSS?

北慕城南 提交于 2020-12-29 03:57:32
问题 If I have an image loaded from an arbitrary URL (local or remote), and do not want to use javascript nor server-side processing, is it possible to sharpen it from client-side with CSS? 回答1: Yes , for some browsers this is already possible (like Chrome and Firefox). In particular, you need mix-blend-mode and CSS filters. Here's a codepen with the Lenna image as example, and a (compiled) copy of it as a code snippet: .foo, .bar, .bar::after, .baz { width: 512px; height: 512px; position:

Holding password in javascript variable - security implications?

冷暖自知 提交于 2020-02-13 07:28:59
问题 Does holding a user's password in a javascript variable in the browser expose any specific security vulnerabilities, over and above the usual security vulnerabilities of a browser-based client? Consider this snippet as a simple example - jsfiddle here <label for="password">Password</label> <input type="password" id="password"/><br/><br/> <button type="button" id="pwdButton">Store password in window.password</button> <script> function getContentsOfPasswordField() { return jQuery("input

Server and client side rendering in node.js

北城余情 提交于 2020-02-08 08:50:49
问题 I don't understand the concept of client-side rendering. I have always used server-side rendering with PHP/Ruby, I don't see how it is possible to have client side rendering. Who does the work? The browser? If someone could give explanations or links that explains that, I would be grateful. 回答1: Without sounding sarcastic, it is a distinction between client-side compilation/manipulation, server-side compilation/manipulation, or a combination of both. While the browser is the thing that