118 questions
0
votes
0
answers
24
views
OnclientClick and OnClick is not working at the same time in <asp:Button />?
<form id="form1" runat="server" method="post" class="needs-validation" novalidate="">
<div class="form-group">
<...
0
votes
1
answer
45
views
Validation of WebForm using javascript
I have two events on my submit button. one is OnClientClick and second is OnClick. OnClientClick is used to validate form and OnClick is used to submit the record in database. firstly I want to ...
0
votes
0
answers
23
views
Main Page reloads into iframe when selecting other buttons
I have a page (BANK) with multiple "search by" buttons. I also have a gridview that narrows down by the search options. Once you narrow it down, you can select a button (kit) and in turn ...
0
votes
1
answer
658
views
Add parameter to OnClientClick window open in Gridview
I am trying to open a new tab when a button from a Gridview is clicked. I want to know how to properly attach the parameter from the Gridview to the URL. The error I get is the sever tab is not ...
0
votes
1
answer
1k
views
How to add Confirmation Message ASP button click
I need to add confirmation when I click a button.
My ASPX code as follows,
<script>
function ConfirmMessage() {
confirmDialog('Delete TEST', "Are you sure you want to delete");
...
0
votes
1
answer
621
views
In asp.net button onclick and onclientclick not working for alert and confirm methods in javascript
<asp:Button ID="btnSubmit" runat="server" style=" float:left" Text="Submit" `OnClientClick="submitRequest();" onclick="btnSubmit_Click" TabIndex="8"/>`
and
<script type="text/javascript"&...
1
vote
0
answers
242
views
Delete data from the database while clicking an action in sweet alert
Basically, I am trying to create a sweetalert delete action while we click on delete(link button) inside GridView. While I'm clicking Delete Option on Sweetalert the record is not deleting.
This is ...
0
votes
0
answers
185
views
Object doesn't support property or method 'Deferred'
I have implemented a javascript confirmation dialog.
The dialog will open onClientClick event:
<asp:Button ID="btnIssuerRemove" runat="server" class="ui-button ui-widget ui-state-default ui-...
0
votes
1
answer
451
views
use OnClientClick on bootstrap modal to avoid postback
Am using vb.net in asp.net to create my project. I use also a bootstrap modal to get data from client.
In the modal I have buttons and textboxes that get the data from user. there is a FINISH button ...
1
vote
3
answers
510
views
Create button OnClientClick asp net
I'm creating button from code c#:
Button btnAddCalculation = new Button();
btnAddCalculation.ID = "btnAddCalculation";
btnAddCalculation.Text = "Add count";
...
1
vote
1
answer
895
views
Fire OnClick after OnClientClick AJAX has finished
I'm using ASP.Net and need to call a server side function after the JavaScript function has completely finished.
The problem is that it's executing the server code before the client code is finished ...
2
votes
2
answers
3k
views
Trigger both 'onClick' and 'onClientClick' event on an ASP button from Javascript
I'm working on an existing code and came across a ASP button which has a onClick and onClientClick event on it.
I'm trying to generate a click event from an external Javascript file so that both the ...
0
votes
1
answer
949
views
How to make my OnClientClick execute within pre-existing if statements?
I have an asp.net web app and one of my pages is for payment. I have a submit button that will only work if 1) you have selected a currency in which you wish to pay (done with radio buttons) and 2) ...
0
votes
0
answers
103
views
asp.net generate monthly reports 30-minute process and update browser label with status
Using VS-Express-Web-2012 ASP.NET WebForms and Reportviewer control to generate reports. There are a list of customers (selected by the user), a list of email-recipients for each customer, and a list ...
0
votes
0
answers
47
views
onclick event getting executed inspite when onclient click event returns false
I have a validation function written in external JavaScript file.
I call this function using onclient property. It was running successfully until I added a stored procedure to insert data in database ...
1
vote
2
answers
6k
views
How to add onclientclick attribute to a Linkbutton from C#code?
I am trying to add onclientclick attribute to a linkbutton that has been created in the C# code only which gives error.
Following is the code for the same :
LinkButton imghelp = new LinkButton();
...
1
vote
1
answer
1k
views
How can I run my Javascript OnClientClick and C# OnClick without postback?
I have a div that acts as a popup in my master page called 'mydiv-clear'.
I have my main page content inside the div 'fade'.
I am able to successfully "popup" my div (change display from none to ...
0
votes
4
answers
1k
views
ASP.NET OnClick/OnClientClick - Broken if submit button disabled
I have known good working JS validation functions (validated all the way back to OnClientClick). When called by OnClientClick, they check whether all the required fields have been populated, disable ...
3
votes
1
answer
44
views
Running Server Method after Client Javascript Method
Is it possible to setup an asp button so that when it is clicked, the client-side javascript will run, and then the server-side c# method will run, but only after the prior javascript has completed? ...
0
votes
4
answers
3k
views
Avoiding PostBack OnClientClick event in asp.net
I've below asp buttons in radAjax:RadAjaxPanel control which has OnClientClick event -
<radAjax:RadAjaxPanel ID="Panel" runat="server" LoadingPanelID="Loadingpanel6">
<table>
...
0
votes
3
answers
2k
views
how to get link to open new tab in browser?
I have a save button that saves all the information the user enters from a form into the database. Once all that is done, I want a new tab to automatically open.
So the code checks if the save is ...
0
votes
1
answer
131
views
Server side is not working when i put return in onclientclick
Please help me. I have tried all solutions and it doesn't work.
OnclientClick function works when I put return success(); but Onclick does not work.
My OnClientClick function:
function success() {
...
0
votes
1
answer
650
views
OnClientClick function not working in Edge browser
I have a LinkButton control "Add to Bag" and when clicked I want to call a JavaScript function which adds CSS animation. It works on every other browser except Edge. I tried to research online if ...
0
votes
1
answer
731
views
OnClientClick triggered when enter pressed in ASP.NET
I have a form with runat="server" and inside it I have two elements :
<form runat="server">
<asp:Button runat="server" OnClientClick="doSomething();" />
<asp:TextBox runat="server"...
1
vote
2
answers
926
views
How do i add onclient click to my jquery button
I have dynamically created a button in jquery as shown below, how do i add the onclientclick attribute to it as i've done the class so when this button is added to the page, it does not cause a ...
1
vote
3
answers
2k
views
When clicking a button, the OnClientClick event does not raise
I have a js function like so:
<script type="text/javascript">
function Cols() {
rows = document.getElementById("GridView1").rows;
for (i = 0; i < rows.length; i++...
1
vote
1
answer
905
views
How to set the OnClientClick value - syntax?
ASP.NET coding in VB.NET -- web application.
I am asking a few questions about the "proper way" to set the OnClientClick phrase in the aspx button declaration.
Option 1: leading with 'javascript:' ...
0
votes
1
answer
1k
views
How to Enable Link Button through Javascript it is initially set to Enable = false
I am new to this kind of programming. I am trying to enable a Link Button on enter of any text in a ASP Text box. Basically it is a search text box when it has text the Search link should be enabled ...
0
votes
0
answers
355
views
Call code behind by clicking on a table row
When the user clicks on a row TR in a table. I would like to call the code behind function ViewButtonPressed_Click(MapId)...
The plan was to: upon clicking a row, fires a JS function, which calls a ...
1
vote
1
answer
994
views
Asp.net buttons event click without do postback. Is it possible?
I would like to know if is possible to use a asp:button, use an event click. and call a javascript instead code behind without to do postback?
I need to record voice and I´m using javascript to do ...
2
votes
1
answer
616
views
ASP.NET GridView Deletion 'Input string was not in a correct format'
I have an ASP.NET GridView that displays clothing products from my database. A field in my database is Price and to display this as £xxx.xx I have set the Price DataFormatString to {0:C}.
The ...
-1
votes
2
answers
945
views
Updatepanel progress bar onclientclick event
I have an Update Progress bar which is working for OnClick event (Server Side), but I need Update Progress bar for OnClientClick event (Client Side).
I have tried below solution but it's not working ...
0
votes
2
answers
4k
views
Yes/No MessageBox in ASP.Net
I want to use JavaScript Message-Box in ASP.Net with Yes/No option. The scenario is, when I am calling the JavaScript function on a Client_click event of a button, its working fine. But when I am ...
0
votes
0
answers
40
views
how to write this piece of code in aspx page
Is it possible to write this line in aspx page on button client click event.
button.Attributes.Add("onclick", string.Format("postback(\"{0}\", \"\"); return false;", buttonSave.UniqueID));
0
votes
1
answer
2k
views
OnClick and OnClientClick not working together in RadButton
IN RadButton OnClick Event and OnClient Event are not working together. Javascript is not called by OnClient Click in radbutton. I also use RadAjaxSetting.
<script language="javascript" type="...
0
votes
1
answer
463
views
Is it possible to fire a button's ClientClick event from another button's Click Event? [duplicate]
I need to display a YesNo messagebox, in case of a server side code execution failure. As far as I can tell, you can't show a messagebox from the server side. Is a walk around of sorts, where I fire a ...
1
vote
0
answers
545
views
Enlarge pop-up and increase font size/bold for JavaScript
I'm newbie, can you help me regarding:
Enlarge the pop-up to bigger size
Increase the font size or bold
Javascript:
<script type="text/javascript">
function script2() {...
0
votes
2
answers
1k
views
OnClientClick javascript does not rendered for asp disabled button
<asp:TemplateField HeaderText="Desc" ItemStyle-CssClass="btnDesc">
<ItemTemplate>
<asp:Button ID="btn_desc" runat="server"
Enabled="<%# ProcessDescButton() %>"
...
1
vote
2
answers
1k
views
Creating text & button controls dynamically and populating text box with date values
I currently have a VB.Net application that builds textboxes dynamically.
I need to display a button control which will display a datepicker and then populate the corresponding textbox with the ...
0
votes
1
answer
5k
views
OnClientClick Javascript:confirm get value in textbox?
So I can't seem to find anywhere how to do this. I want to be able to use the value of BuyOutPrice in the text(confirm) box but can't seem to make it work.
More specificly, how am I supposed to ...
2
votes
1
answer
1k
views
Concatenating a #EVAL to a OnClientClick function
I'm trying to concatenate an Eval data to an OnClientClick function. What I did is this:
<asp:LinkButton id="Activate" runat="server" OnClientClick='return confirmActivate(<%# Eval("nameID")%&...
0
votes
2
answers
4k
views
Onclient Click Event Fires when Enter Key Press on TextBox
I have a Search TextBox on Master Page,and i want that user write its word and on pressing enter key it should start searching. So onkeypress event i call a function which takes a searching word and ...
1
vote
3
answers
4k
views
How to make a popup in ASP.Net and pass information to it using a query string?
I have all the code I need to response.redirect a page and pass the information I need to the other page. But I don't want it to redirect the page but rather create a popup in the page.
I have code ...
2
votes
2
answers
19k
views
How to load a View as Kendo Window popup on Button Click Event
I am trying to load a view in a kendo window only on click button’s event.
Actually, the popup is displayed each time on the load of the base page. I want that that popup loads only on the click event ...
0
votes
0
answers
159
views
How to add client-side validation if I use CommandName for the button?
I have a code where I have a asp:Button control with CommandName attribute. GridView has OnRowCommand. When I click the button, I execute a method on RowCommand event to update records. Inside of ...
0
votes
2
answers
2k
views
onOnClientClick is working but onClick is not working on asp.net
I have this code on my javascript:
function getListOfPOI() {
geocoder = new google.maps.Geocoder();
var address = document.getElementById('tbCity').value;
...
0
votes
1
answer
2k
views
Can't remove/change onclientclick event from asp button JQuery
I have some code in my site that checks against a credential object. Depending on the type of user, I register a .js file that contains some code that disables functionality. I just want to remove or ...
0
votes
1
answer
1k
views
Using OnClientClick to validate if Textbox contains data and then display another row if yes
i have a form in which i enter telephone numbers. i have used an image button that when pressed, it should display a new row to enter a telephone number if there was one entered in the textbox before ...
0
votes
2
answers
2k
views
Using onClientClick and onClick together with form submission
So I'm having some trouble. Even after trying many different solutions my problem is still persistent.
The button click will fire the java script code, but not the server side code.
<asp:Button ...
1
vote
1
answer
190
views
OnClientClick multiples javascript calls [duplicate]
Hi that's a simple code that I saw in my asp.net course references...
I don't understand something in the property onClientClick:
onClientClick = "myClick(); return false;"
Why in this case (or ...