Subscribe: Web Forms
Added By: Feedage Forager Feedage Grade B rated
Language: English
data  facebook  files  form  function  https  ipv  microsoft  model  mvc  net  new  page  repeater  reporting  val  var 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Web Forms

All Forums

All Forums

Last Build Date: Sat, 24 Feb 2018 14:34:17 -0800


For Sale Brand New Canon EOS 5D Mark III Digital SLR Camera Body


Product Information
The Canon EOS 5D Mark IV is a high-quality digital SLR camera with an outstanding picture resolution of 30.4 megapixels. This pack includes the camera body only, which features a sleek, black design with a 3.2" LCD screen. It is powered by a lithium-ion battery and supports USB wired connectivity with external devices. The camera also records HD video with a maximum resolution of 4096 x 2160p.

Contact :

Canon EOS 5D Mark III Digital SLR Camera Body
22.3 megapixel full-frame sensor
61-point AF
6 fps continuous shooting
ISO 100–25,600 sensitivity, expandable to ISO 102,400
Full-HD video with manual control
14-bit DIGIC 5+ processor
Weather sealing
8.11cm (3.2-inch) 1,040,000-dot screen
HDR mode
Headphone output

Contact :

Data Anotations doesn't work


Hi I registered the unobstrusive validation in a function: function MostrarConfirmacionMotivo(idControl, success) { var controlMotivo = $("#motivo_" + idControl); if (controlMotivo.length) { controlMotivo.val(''); } if (formControl) { formControl.resetForm(); } $("#formMotivo_" + idControl).data("validator", null); formControl = $("#formMotivo_" + idControl).validate(default_validate(function () { if (controlMotivo.length) { success(controlMotivo.val()); } else { success(); } $('#' + idControl).modal('hide'); })); $('#' + idControl).modal('show'); } The value of : default_validate function default_validate(handler, validateHidden) { var defaults = { highlight: function (element) { $("input").removeClass("error-message"); $("textarea").removeClass("error-message"); $("select").removeClass("error-message"); }, errorClass: "error-message", submitHandler: handler }; if (validateHidden) { defaults.ignore = []; } return defaults; } The problem is that the validation doesn't work: The view is: @using Rep.Traserep.Presentation.Web.Strings; @model Rep.Traserep.Presentation.Web.Models.ModelModalMensaje @{ ViewBag.ModalId = Model.IdModal; ViewBag.ModalTitle = Model.TituloModal; ViewBag.ModalSize = ""; Layout = "~/Views/Shared/_LayoutModal.cshtml"; }
@if (!string.IsNullOrEmpty(Model.Advertencia)) {
} @if (Model.Motivo) { using (Html.BeginForm("AnularSolicitud", "Solicitud", FormMethod.Post, new { id = "formMotivo_" + Model.IdModal })) {
Motivo @Html.TextAreaFor(x => x.ContenidoMotivo, new { id = "motivo_" + Model.IdModal, @class = "form-control", maxlength = "500" }) @Html.ValidationMessageFor(x => x.ContenidoMotivo, null, new { @style = "color: red" })
} } @if (!string.IsNullOrEmpty(Model.Confirmacion)) {
} @section modalFooter { } The model with data anotations is: using Rep.Traserep.Presentation.Web.Strings; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; namespace Rep.Traserep.Presentation.Web.Models {     public class ModelModalMensaje     {         public string IdModal { get; set; }         public string TituloModal { get; [...]

How to save image path in database and save image in specific folder of project.NET core


[HttpPost] [ValidateAntiForgeryToken] public async Task Create(Employee emp) { if (ModelState.IsValid) { var files = HttpContext.Request.Form.Files; foreach (var Image in files) { if (Image != null && Image.Length > 0) { var file = Image; //There is an error here var uploads = Path.Combine(_appEnvironment.WebRootPath, "uploads\\img"); if (file.Length > 0) { var fileName = Guid.NewGuid().ToString().Replace("-", "") + Path.GetExtension(file.FileName); using (var fileStream = new FileStream(Path.Combine(uploads, fileName), FileMode.Create)) { await file.CopyToAsync(fileStream); emp.BookPic = fileName; } } } } _context.Add(emp); await _context.SaveChangesAsync(); return RedirectToAction("Index"); } else { var errors = ModelState.Values.SelectMany(v => v.Errors); } return View(emp); } when i save image, image save successfully in database, but it takes full image path like this C:\Users\VIZO\Desktop\employee.jpg i dont want like this, i need to save image path something like this ~images\employee.jpg. The other problem is image doesnt saving in specific folder of project, i need to save image in this path of my project  uploads\\img [...]

Image hosting?


Why do I have to go through the hassle of uploading and hosting my files on external sites like Imgur? I have used Imgur for hosting my screenshots for my very thread on this forum. I will try to keep these files online for as long as possible, but I don't plan on keeping these files forever. They clutter up my private space on Imgur and I have the extra work of keeping them organized in albums and adding new images to the appropriate album and copy and pasting the direct links to the files.

Is there any chance you could start hosting your own image files and other type of file attachments? Imgur is excellent for screenshots, that's why it's used by sites like Stack Overflow. Maybe you could get a professional account with them and use their API to upload and host the image files over at Imgur? Another benefit of Imgur is that it's very easy to quickly create thumbnails and galleries with just a few edits in the original post. portal home page is not displaying properly


Hi Team,

Home page of ASP.Net portal is not displaying properly in IE as well as in Chrome. The page has been scattered here and there.

Please let me know if i need to update in browser settings.



URL Result generated by Url action


I read that the following code:

Url.Action("someaction", "somecontroller", new { id = "123" })



I am using this approach to make an image clickable so a controller/action is fired but what I see is that the result is:


Although I am getting the parameter value, I would like the URL to be shown as the first option. How can this result be achieved?

Jorge Maldonado

How to sign in with Facebook account in an ASP.NET MVC project?



So I follow the official guide on creating an ASP.NET MVC project and enabling Facebook authentication, by Rick Anderson of Microsoft. I am able to authenticate with Facebook, but I still can't sign in. The problem seems to be that I do not get the registration form when I authenticate for the first time.

  1. I create a new ASP.NET MVC project.
  2. I enable individual user accounts.
  3. I update OWIN from 3.0.1 to 4.0.0.
  4. I add RequireHttps attribute to the Home controller.
  5. I enable SSL.
  6. I copy the HTTPS URL and paste it in as the project URL.
  7. I create a new Facebook app, add Facebook Login (OAuth) and configure it for my localhost app.
  8. I enable the UseFacebookAuthentication method and add my app ID and app secret.

The problem seems to be that I do not get the registration form when I authenticate for the first time. So when I click on the Facebook sign in button, the URL changes from https://localhost:44333/Account/Login to https://localhost:44333/Account/Login#_=_ and no registration form is displayed.

What am I missing?

Updating OWIN




Enabling SSL




Adding API key and authenticating






If you are a frustrated ASP.NET beginner like myself, and you stumbled across this post in search for answers, please make note that the guide I linked to above is 2 years, 11 months and 20 days old at the time of this writing. It's amazing how fast things get outdated. One thing you need to do that's not mentioned in the guide is that you need to provide a valid redirect URI. I believe this is a new requirement for OAuth 2.0. If you fail to do that, you will run into the problem you see below when you try to authenticate.


All you really need to do is add the local HTTPS address for your app as you see below.


The definition of this report is not valid or is not supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services



I created a blank reportviewer in Visual Studio 2017 but after I added a control I received the error:

ReportProcessingException: The definition of this report is not valid or does not support this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or it may contain content that is not in the correct format or that is not valid according to the Reporting Services schemas. Details: The report definition has an invalid destination namespace '' that can not be updated.

I don't know the configuration to avoid this error.

The unique solution was found in this link..

But I don't understand this behavior.

In other words... Visual Studio changed:

<Report xmlns="" xmlns:rd="">
 with this code after I edited the report:

Bootstrap not working anymore



I have an out of the box MVC application which I just started. I added a new view, now Bootstrap isn't working on the whole project.

The new view is simply a blank view template.

Any Ideas?


core 2.0 sample page with register login: mailkit instead sendgrid possible?


Hello guys,

i am using the core 2.0 registration / login / logout sample page.

Now i try to figure out how to replace sendgrid with mailkit or SMTP (as far as i know microsoft recommends Mailkit).

I am not able to make him send anything is causing headache!

has anybody hints or tutorials how to get this working?

Simple Question


Just started trying MVC/MVVM. My modifed version from VS2017 seems to work fine - and comes up as 

( http://localhost:62850/) .

But once I leave VS environment I dont know how to launch it ...

If I publish the site ( using folder ) to a test web server under a folder ( call it IPV)  I see lots of folders.. but I dont see any index.html etc

What is the address of the site ?,,, I am using the true folder address,,,,, but  there's no index.html....

There are  some folders with views with .cshtml  and just as an experiment tried ( none worked )

.....Ipv/Views/ipv/IPV.cshtml   ( should have been my starting view ) 

Also tried ...   Ipv/Views/ipv/home/index.cshtml    

Whats the key here ??    Does simply calling http;//companyTestserver/FolderPaths/IPV supposed to engage the site ?   I tried that and nothing happened just said it could not display the directory,

Note : the page where I hoped to start ..

@using IPV.ViewModelLayer
@model IPViewModel
Layout = "~/Views/Shared/_Layout.cshtml";


I noticed from the Getting sstarted pages that Razor pages should start with @page but none of the views with .cshtml start with @page

Also noticed ( ) that the discussion on URL and file location maps to Pages/index.cshtml

But the MVC ( and I am still on Windows 7 for 2 more months  so not using .CORE for development ) doesnt have pages folders rather VIEWS... but that will still suggest that the IIS must be configured to recognize IPV as a site ....   Is that correct ?  I cannot load it as folder in an existing site and call it like other HTML pages ?

Thanks !!!

Where is my post?


I made a post, but I can no longer find it.

Original URL:


This thread has no approved posts. Please refresh if it should."

Where is it? Has it been deleted?

If I use the URL above I can see the post/thread/notsurewhat, as you see below.


But why is the title listed twice? If I navigate to the MVC forum...

I can not see it.


And if I refresh the page in my browser that still displays the post with the URL...

I get the "sorry" message.

Use if statement of repeater in repeater


I have 2 nested repeaters. I can't use the eval on the first repater in the second repeater if statement. I want to compare Repeater1 Eval and Repeater2 Eval in the Repeater2 ItemTemplate. How can I do that? Thank you for help. Here's an example:

        <% if (Repeater1Eval == Repeater2Eval) { %>
                //Show Something
        <% } else { %>
                //Show Something
        <% } %>

Extract Multi Image from a field in SQL


I have a task to extract multiple image from a single field in SQL. It has another field that show how many images in Image field. 


Any idea how to extract and save this image to local folder?
I have a code to save a single image, but failed to save multi image into multi file.

FineUploader data


Hi Community. I apologize in advance if this is a repeat question, but I've been searching around and haven't been able to find any answers.

I'm trying to get write Controller (in core) code to handle my fineuploader requests but it keeps failing to see the request data. Here is my uploader config in the view page:

var uploader = new qq.FineUploader({
            element: document.getElementById("uploader"),
            request: {
                endpoint: '@Url.Action("AddAttachment", "Util")',
                customHeaders: {
                    "RequestVerificationToken": '@GetAntiXsrfRequestToken()',
                    "Content-Type": 'application/json'

And here is my controller code - not alot for now, I just literally want to see some data getting sent.
public JsonResult AddAttachment([FromForm] Object o){
         //var x = HttpContext.Request;
         //return Json(x);
         if(o == null){
             return Json("no data");
             return Json(o);

and her is what I see fineuploader sending to the server via the network tab in the chrome devtools:
Content-Disposition: form-data; name="test"

Content-Disposition: form-data; name="qquuid"

Content-Disposition: form-data; name="qqfilename"

Content-Disposition: form-data; name="qqtotalfilesize"

Content-Disposition: form-data; name="qqfile"; filename="dohPlayDat.PNG"
Content-Type: image/png

Any help at all will be greatly appreciated

Bootstrap Date Picker


Hello Experts, Many apologies in advance for asking a simple question. I have tried to find a solution to this for days now!! I have inserted the datepicker code into a new webform. But no matter what else I do, I cannot get it to work. When i run in the browser, Ican see the box and the image to click on but nothing happens on click. So the date picker doesn't appear. I can also type into the box. My code is below. I would be very, very grateful if someone could help me out with this. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Test.WebForm1" %>

How to get an accesstoken from facebook to create a photo album ?


In a Core application I want to create a photo album on a page I manage.

In a console application I have been able to create a photo album and upload a photo to that album. The access token I used I obtained via the Facebook graph api explorer.

Now I need to obtain the accesstoken from within the web application.

My application use Azure AD authentication and I do not want endusers to authenticate with facebook, that is not needed since they are not posting to facebook and the application will not post to their facebook account.

So how do I implement this?

JSON Serialization


I am writing a service(technically, it's mvc website, but whatever) that is supposed to send and recieve requests to and from a Telegram webhook. Looking through different serialization options I stumbled upon DataContracts, which seemed like a really cool thing providing a fine control over serialization via attributes. But since DataContract is a WCF thing, which is completely unknown to me, I wonder if that's the right thing to do?

Jcrop not working when using masterpages MVC Core2


have a had this issue twice and stranded.

Jcrop does not work when I add a layout page, however when I remove the layoutpage and use layout is null it works

Error message in google inspect is JCrop:244 Uncaught TypeError: $(...).Jcrop is not a function at FileReader.reader.onload (crop:244)

I am using MVC core 2

kindly advise

thank you

    //= require jquery.Jcrop.min 
    $(function () {
        $('#FileUpload1').change(function () {
            var reader = new FileReader();
            reader.onload = function (e) {
                    onChange: SetCoordinates,
                    onSelect: SetCoordinates

        $('#btnCrop').click(function () {
            var x1 = $('#imgX1').val();
            var y1 = $('#imgY1').val();
            var width = $('#imgWidth').val();
            var height = $('#imgHeight').val();
            var canvas = $("#canvas")[0];
            var context = canvas.getContext('2d');
            var img = new Image();
            img.onload = function () {
                canvas.height = height;
                canvas.width = width;
                context.drawImage(img, x1, y1, width, height, 0, 0, width, height);
            img.src = $('#Image1').attr("src");
    function SetCoordinates(c) {