Skip to content
Advertisement

Tag: asp.net

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

Javascript or Jquery validation on textChanged

I need to do the validation for the P.O box on text changed event. If the user types P.O Box in the address text box and also request for expedite shipping by checking a chec box then I need to show the warning message to the user saying that expedite shipping cannot be done to the P.O box address. For

Multiline textbox value split using javascript in Asp.Net C#

Asp.Net C# Multiline textbox(textbox1) value split after 35 charaters of address & add to textbox(textbox2 – Singleline) again split next 35 charaters & add to textbox(textbox3 – Singleline) again split next 35 charaters & add to textbox(textbox4 – Singleline) again split next 35 charaters & add to textbox(textbox5 – Singleline). Note: While Splitting value after 35 characters make sure if

Access Messages from Message Center

Hi I’m try to display the top 5 messages from the message center on the homepage. But I’m not sure what I’m doing wrong. I try to get the messages from the message view model here is my code. View model MessageViewModel.cs Controller Cshtml Answer To display top 5 records, we should use the “OrderByDescending()” to sort the message, and

FileUpload: Get filenames with JS not working

I want to get filenames and put it in label lbName but this code is not working. I used asp:FileUpload. This is my code: <asp:FileUpload ID=”FileUpload1″ AllowMultiple=”true” runat=”server” Onchange=”upload()”/> <asp:Label ID=”lbName” runat=”server” ForeColor=”Gray” Visible=”True”></asp:Label> and JS code: Answer You could use jQuery and bind a change event to the input type=file. Or if you want to make your javascript work:

Advertisement