Cookie Always return Null

I have a cookie created in the server side as below HttpCookie cookie = Request.Cookies["mycookie"]; if (cookie == null) { cookie = new HttpCookie("mycookie"); cookie.HttpOnly = false; cookie.Path = "/"; c...
more »

2017-01-13 15:01 (1) Answers

Custom focus on elements

I am new user at stackoverflow. I am facing issue to set custom focus on certain elements on We can use or java script functionality. My current page layout I want to focus on first with page load on payment 1 text box then payment...
more »

2017-01-13 13:01 (3) Answers

Two tables in a view with ViewModel

I built a class in the model folder with this name XMLbetViewModel and then I putted one of two tables which I had as a property like below: using System; using System.Collections.Generic; using System.Linq; using System.Web; using DataL...
more »

2017-01-13 12:01 (2) Answers

ASP.NET Web Api returns bad data

I've generated my Web Api Controller by scaffolding, I added WebApiConfig and Web Api works but returns bad data. For example: I have some entities - Player with attributes ID name, surname etc. and PositionId, Position with attributes name and ID....
more »

2017-01-13 00:01 (2) Answers

Ajax File Upload is not working in 3.5

I am using 3.5 version in my web project. While I am using Ajax File Upload object, there is no problem to open File Upload page on my browser. However, I cannot view file upload object in the page. I cannot choose or click on it. The screen...
more »

2017-01-12 21:01 (1) Answers

Getting difference between two dates in days

I have a specific problem where I have records in my DB table like the following: LastUpdated 10 January 2017 (The dates are stored in the database as a DateTime type.) Now I need to fetch the difference in days between today's date and the last...
more »

2017-01-12 21:01 (1) Answers

Clear Session in ASP .NET MVC 5?

I have a question. I work in ASP .NET MVC 5 . I want to prevent is that , after logging out , then I click the back navigation button , I don't want to go back to the previous page . Is there anyone who can help me? I use Session Clear and Abandon me...
more »

2017-01-12 12:01 (3) Answers

How to change the state of Control

I have a checkbox control in .aspx page. Now in my c# code I am able to find out the checked/Unchecked state of the control with below line CheckBox objCheckBox = (CheckBox)objGridRecord.Items[0].FindControl("chNo"); Now I need to change the Che...
more »

2017-01-12 11:01 (1) Answers

What is v4 rendering mode in

I am working with a webControl which has a property named EnableV4Rendering. However, I have no idea what it is and what it does. The problem is this property will disable my webControl if I set it to true and break the css when it is false. So coul...
more »

2017-01-12 03:01 (1) Answers

Blogger API v3.0 - Working with users (OAuth 2.0)

Please see this documentation link: So, I'm trying to 'get a user' by user ID. This is a blogger blog user. We are the owners of the blog and the site respectively, and all the bl...
more »

2017-01-11 15:01 (1) Answers

Add JavaScript files in mvc

I am new in mvc and I am trying to include .js files in my project but I could not access it on my browser. Like it. @Scripts.Render("~/bundles/responds.js") @Scripts.Render("~/bundles/jquery-1.11.3.min.js") @Scripts.Render("~/bundles/jssor....
more »

2017-01-11 11:01 (2) Answers

ASP.NET C# Ajax Call Error

I'm going straight to the point here. I'm trying to get the value pass from my ajax to controller and console.log the value. however, when I try to console.log the value it gives me error 500.. here's my code: I've been doing ajax on php for a l...
more »

2017-01-11 03:01 (2) Answers

Net core custom user property

I'm using the default authorization in my .NET Core project. I want to check if an user is admin so in ApplicationUser.cs model I've added this: public class ApplicationUser : IdentityUser { public bool admin { get; set; } } I migrated these...
more »

2017-01-10 16:01 (2) Answers

C# LinQ Conditional OrderBy

so this is my query var results = tcs.Skip(searchModel.PageSize * (searchModel.Page - 1)) .Take(searchModel.PageSize) .AsEnumerable() .Select(x => new { trackId...
more »

2017-01-10 06:01 (3) Answers

How to create keyless URL parameters in ASP.NET

I have seen this answer describing ASP.NET support for keyless (not valueless) parameters, like http://some.url?param1&param2, and confirmed them to be viewable on Request.QueryString like: var values = this.Request.QueryString.GetValues(null); ...
more »

2017-01-09 15:01 (2) Answers

Replace all URLs with hyperlinks

I have following code which uses regex to find all the urls within a given string: Dim regex As New Regex("(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)", RegexOptions.IgnoreCase) Now, I want...
more »

2017-01-09 13:01 (1) Answers

Scaffold a Date and Time Picker

When scaffolding a view from a model with the property below it produces code that renders a browser date picker which works great. How can you scaffold a property that produces a date and TIME picker? [Display(Name = "Date Start")] [DataType(DataT...
more »

2017-01-09 11:01 (1) Answers