Skip to content
Advertisement

Tag: asp.net-mvc

C# load cshtml into modal with JQuery

I want to load the content from one page into a modal on another page on the click of a button, but it is also loading in the content from the __Layout page. I have tried calling a controller using: However, I cannot get it to load in solely what is in the MyPage.cshtml file. What am I doing wrong?

JS not firing at all

I cannot get my button to trigger the javascript. This seems to be quite straightforward? What is keeping the alert from showing up? Answer You should end of the script tag if you add source only. And you should add extra script tag for internal script. And input type should be button because you are not submitting a form in

Export to PDF error using Dot Net Report Builder

I am using the MVC version of the Dot Net Report Builder. I am able to configure dotnetreport and run a test report, but if I click on Export to PDF I get a javascript error – unexpected token export. Looking at the javascript console error it seems to be originating from bootstrap/popper. Answer Thanks for pointing this out, this

GUID model binding in ASP.NET MVC

I was hoping someone could help me sort this out. The solution to this is probably obvious but I can’t seem to figure out what I’m missing… I’m trying to issue a get request from my Javascript code, and the URL contains a Guid. The ASP.NET controller does not get hit/register the request to the API. I’ve tried a couple

Prevent string to become number in javascript

I have a string 100-10-0 in my MVC model. I have to pass this string to a javascript function on an HTML button click. My code is: @Model.BarCode has the value “100-10-0”. My javascript function is: Problem here is that when barcode comes to javascript method as parameter it is converted to number and the minus operator is applied on

Call Javascript function on click of dynamic tab

I am new to MVC and I have not written a lot of jQuery/JavaScript. I am trying to call a JavaScript function on click of a nav-tab. The nav-tabs are added to the page dynamically. I know the “name” of the specific tab which I need to call the function when clicked, but for the life of me, I cannot

Advertisement