Category : asp.net

I have the following object being returned from a post request "{"Success":false,"Errors":{"Name":["The Name field is required."],"Id":["The Id field is required."],"SortOrder":["The SortOrder field is required."]}}" I need to iterate through the Errors object and find the Id field and highlight it on my page. How would i go about doing this? I can iterate through a ..

Read more

i tried onkey_up to copy one textbos data to another textbox on an user control ascx file but when i run its not wroking.is it because of i wrote onkey_up function on .ascx , i should write on master page? function sync() { var TextBoxA1 = document.getElementById(‘TestAmountTextBox’); var TextBoxA2 = document.getElementById(‘TestAmountTextBox_2’); TextBoxA2.value = TextBoxA1.value; } ..

Read more

Snippet from my _layout.cshtml file <body> <!– NAVBAR –> <div class="navBar"> <input id="homeButton" type="submit" name="homeButton" value="Home"/> <input id="toolsButton" type="submit" name="toolsButton" value="Tools"/> <input id="contactButton" type="submit" name="contactButton" value="Contact Me"/> <input id="supportButton" type="submit" name="supportButton" value="Support"/> <input id="aboutButton" type="submit" name="aboutButton" value="About"/> </div><!–TODO: STYLE THESE –> <script> const homeButton = document.getElementById("homeButton"); const toolsButton = document.getElementById("toolsButton"); const contactButton = document.getElementById("contactButton"); const ..

Read more

i have some problem about my select dropdown [used by selectize js plugin ]. my dropdown options will remove after jquery unobtrusive error in form. how can i fix it. <select asp-for="LocationId" class="selectize form-control" asp-items="Viewbag.Locations"> <option value="">— Select Your location —</option> </select> $(".selectize").each(function () { var options = { create: false, allowEmptyOption: true, sortField: ‘text’, ..

Read more

I have a link https://click.redditmail.com/CL0/https:%2F%2Fwww.reddit.com%2Fr%2FAskReddit%2F%3F$deep_link=true%26correlation_id=336a9bde-3ddf-4aa4-a8d7-a049f279ad43%26ref=email_digest%26ref_campaign=email_digest%26ref_source=email/1/010001772860aced-25d239de-95f3-49e6-9c04-655ec683f5ac-000000/gcM_QjTItGwadrFKEUwhhCYxM5KhNjb_SKzuUIV3ydQ=177 This will redirect to https:%2F%2Fwww.reddit.com%2Fr%2FAskReddit%2F%3F$deep_link=true%26correlation_id=336a9bde-3ddf-4aa4-a8d7-a049f279ad43%26ref=email_digest%26ref_campaign=email_digest%26ref_source=email If we change anything in the above URL the redirection doesn’t take place. I think the hash is verified before redirection to protect against Open URL redirection. If anyone knows what kind of technique is this do tell. Source: Ask Javascript..

Read more

I have this code: <script type="text/javascript" src="../Scripts/chosen.min.js" ></script> […] <asp:ListBox class="chosen-select" ID="lbCategory" runat="server" AutoPostBack="true" DataSourceID="SqlDataSourceDropDownListCategory" SelectionMode="Multiple" Width="200px" DataTextField="Name" DataValueField="IdCategory"></asp:ListBox> <script> $(".chosen-select").chosen(); </script> I have the js in the path that I wrote and the script dosen’t work, I tried to search, but everthing I found doesn’t fix it, could someone help please. Source: Ask Javascript ..

Read more