I have a maybe simple problem but I don`t have that much experience with scripts: I have this Skript in my _Layout.cshtml: <script> $(‘button’).click(function () { $(this).prop(‘disabled’, true); }); </script> and one of my views: @using (Html.BeginForm("Create", "Home", FormMethod.Post, null)) { @Html.AntiForgeryToken() <div class="mt-5 d-flex flex-row"> <textarea class="form-control" name="TextArea"></textarea> <button class="btn btn-secondary btn-block mt-2 post-btn" ..
Category : asp.net
I have a custom CompositeControl which implements IScriptControl (that I put together years ago) that just started giving me javascript errors when I added the control to a new page. The control is a MultiStateCheckBox, which uses different images to represent different states for the control. I’m putting the control in a DataGrid, but the ..
I have an API, which accepts page number and page size as a parameter to return user details. Loading data to the jquery data table. Needs to pass page number and size to API for fetch the data each time. How can I get and pass the page number to webmethod and enable next button ..
Here’s the problem, I’m currently working on a T&Cs page that loads a PDF file inside an iFrame. As part of the validation I’m writing to confirm that the PDF was correctly loaded, I’m checking the URL and the content-type. Now this works without issue in Chrome and Edge, but does not work in Firefox. ..
I have the following code: function OnClientLoad(sender, args) { $telerik.$(sender.get_inputElement()).on(‘keyup’, function (e) { var autoComplete = $find("<%= RadAutoCompleteBox1.ClientID %>"); var contents = autoComplete.get_inputElement(); var oe = contents.value document.getElementById(‘hdnParameter’).value = oe; } } <telerik:RadAutoCompleteBox RenderMode="Lightweight" runat="server" ID="RadAutoCompleteBox1" ClientID="RadAutoCompleteBox1" autopostback="true" DataSourceID="SqlDataSource1" DataTextField="edesc" DataValueField="ecode" InputType="Token" Width="100%" Visible="true" AllowCustomEntry = "false" DropDownWidth="300px" OnClientLoad="OnClientLoad" > </telerik:RadAutoCompleteBox> <asp:SqlDataSource runat="server" ID="SqlDataSource1" CancelSelectOnNullParameter="False" ..
I have a tab with following options: Tab1 Tab2 Tab3 Tab 4 Tab 5 January February Last 3 Months Last 6 Months Last 12 Months Now based on above selected tab, I would like to call my Server side API and filter out the data. Approach 1: Public ActionResult FilterData(Datetime from, Datetime to) { // ..
I have a master page that contains the following section: <section id="content"> <asp:HiddenField ID="MasterHidden" runat="server" /> <asp:ContentPlaceHolder ID="Content" runat="server" /> </section> This master page has two child pages. In one of the child pages is a GridView that contains an image button: <dx:BootstrapGridViewDataColumn Caption="Requirements" FieldName="Requirements" VisibleIndex="5"> <DataItemTemplate> <asp:ImageButton runat="server" ID="RequirementsBtn" OnClientClick="setMasterFieldValue()"/> </DataItemTemplate> </dx:BootstrapGridViewDataColumn> When the ..
I have a set of KPI data I need to pass over to a Javascript file from my ASP.NET project. I thought I could do so using a ViewBag… Here is what is in the controller: public ActionResult KPI() { if (Session["OrganizationID"] == null) { return RedirectToAction("Unauthorized", "Home"); } else { int orgId; int.TryParse(Session["OrganizationID"].ToString(), out ..
Is it possible to have the default nav bar from Blazor show up in a webapp using Rete.JS? I believe the infinite canvas pan is hiding the navbar. When I remove the rete.JS script code, my Blazor nav bar shows up fine but when I re-add the rete.JS script to run the library, it stops ..
Sorry for the messy title – I’m new to web development and am unsure of how to best phrase this. My Goal I want to click a button on my React.js front-end, and have the C# back-end activate a GPIO in response. After researching a bit, I would like to use an HTTP Post function, ..
Recent Comments