All Questions
Tagged with razor asp.net-mvc-4
4,579
questions
0
votes
1
answer
82
views
Images won't load in asp.net mvc 4
I never upload ASP.NET MVC 4 on Plesk, work with ASP.NET Core 5 MVC.
I have to develop a project with ASP.NET MVC 4 due to my boss's order. I don't have any problem with localhost and can run the ...
0
votes
1
answer
169
views
Html.Raw and quotes in View
I want to pass object as a parameter to onclick event for in View, so I write code like this
<a href="#" onclick="my_cool_function(@Html.Raw(Json.Encode(model)))">cool action&...
0
votes
0
answers
78
views
How to run a local .rdl report with MVC4 web application?
I am new to SSRS. So far I was able to create a few simple reports an run them locally with Visual Studio and remote database that is also used by my MVC4 web app.
What I am trying to accomplish now ...
0
votes
1
answer
292
views
Antiforgerytoken in ajax post request ASP.NET MVC throwing 500 (Internal Server Error)
I am having trouble with the AntiForgeryToken with ajax. I'm using ASP.NET MVC 3. I tried the solution in jQuery Ajax calls and the Html.AntiForgeryToken(). Using that solution, the token is now being ...
-1
votes
1
answer
181
views
MVC - How to render a 'a href' link in a CSHTML on a HTML and PDF that's been stored in a database
I have an MVC app with CSHTML view
There are 2 question, that have text as "This is the website Google to search."
The text is stored in DB and displayed on the cshtml page which will be ...
0
votes
0
answers
23
views
Passing form values from view to controller
I am newbie to ASP.NET MVC and I have view which consist of some form values and there are 2 buttons save and cancel. On button save click, I want to send the form values to controller method.
When I ...
0
votes
2
answers
48
views
How can I Sort this MVC Drop-Down list alphabetically but IGNORE brackets?
I have a dynamic dropdown list that I need to sort alphabetically, but the issue is, there is some text within brackets that appears on top.
I was asked to sort the text in brackets alphabetically (in ...
0
votes
1
answer
26
views
Can I use a terniary in an html helper?
Curious if it is possible to use a terniary (sp?) in my lambda expression in an html helper. For example I have a search form that uses the same fields but displays different headings depending on ...
-1
votes
1
answer
277
views
Clear the textbox for Html.TexboxFor by embedded x button
I want to have x button in the textbox so text inside can be cleared when user clicks on it.
The project is ASP.NET MVC on .NET 4.8.
@Html.TextBoxFor(m => m.CrewId)
0
votes
1
answer
221
views
Add option to dropdownlist in razor asp.net mvc
I have this dropdownlist:
@Html.DropDownList("CategoryID", new SelectList(ViewBag.Categories, "Id", "Name"),"Select category", new { @class = "form-select ...
-1
votes
2
answers
3k
views
I got Error An unhandled exception occurred while processing the request
i'm newly learning ASP.net Core and i got this error :
I have been searching the solution i internet but didn't get any result. Can anyone help me? this is my code:
Details.cshtml
@model SixthApp....
1
vote
1
answer
297
views
How to create custom HtmlHelper for nullable Boolean radio button group in .NET Core
Trying to make a custom MVC control
[Display(Name = "Do you agree?")]
[Required]
public bool? Agree { get; set; }
-1
votes
2
answers
1k
views
How to pass selected bootstrap dropdown value to the controller in ASP.NET MVC
I inherited this code base in which I need to pass extra property to the controller. This field happens to be a select dropdown for users to select yes or no. I need to pass that value to the ...
1
vote
1
answer
393
views
ASP.NET MVC : Actionlink does not navigate to correct action method of same name but different parameters
I have two action methods with same name. And they both are decorated with the Http verbs 'Get' and 'Post', and also their parameter list is different.
[HttpGet]
public ActionResult Transaction()
[...
0
votes
0
answers
260
views
Is there a method to show string values instead of boolean with EditorFor in ASP.NET MVC?
I have a form where user needs to select the gender in a dropdown list, and I am using EditorFor() for this purpose, which is working well, but is displaying values as True and False, instead of Male, ...