Skip to main content
Filter by
Sorted by
Tagged with
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"> <...
Nirmal I's user avatar
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 ...
Jayesh Shimpi's user avatar
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 ...
Margaret Barker's user avatar
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 ...
A.Mac's user avatar
  • 263
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"); ...
Sachith Wickramaarachchi's user avatar
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"&...
Manojkumar's user avatar
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 ...
Chakradhar Reddy's user avatar
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-...
gene's user avatar
  • 2,108
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 ...
Masarwa's user avatar
  • 43
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"; ...
Alexandr Docker's user avatar
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 ...
fizgog's user avatar
  • 25
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 ...
theLearner's user avatar
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) ...
ACostea's user avatar
  • 141
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 ...
John D's user avatar
  • 647
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 ...
neophyte_coder's user avatar
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(); ...
Shruti Agarwal's user avatar
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 ...
Claire's user avatar
  • 454
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 ...
SlowCoder74's user avatar
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? ...
Michael J Caboose's user avatar
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> ...
user avatar
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 ...
user123456789's user avatar
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() { ...
vaughn ellis ramos's user avatar
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 ...
Colin Roe's user avatar
  • 804
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"...
Rawhi 's user avatar
  • 6,393
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 ...
floormind's user avatar
  • 2,018
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++...
Kristin Vernon's user avatar
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:' ...
John D's user avatar
  • 647
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 ...
abhu85's user avatar
  • 33
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 ...
John's user avatar
  • 3,935
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 ...
Célio Pereira's user avatar
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 ...
markthornton90's user avatar
-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 ...
Vignesh Kumar A's user avatar
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 ...
Vivek's user avatar
  • 93
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));
freeCoder52511's user avatar
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="...
Sumit Manna's user avatar
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 ...
Guy's user avatar
  • 335
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() {...
Muhammad Mohsin Hasanuddin's user avatar
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() %>" ...
SumanP89's user avatar
  • 139
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 ...
user3929962's user avatar
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 ...
Danieboy's user avatar
  • 4,511
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")%&...
marchemike's user avatar
  • 3,277
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 ...
saqib amin's user avatar
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 ...
samibravo's user avatar
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 ...
user3470946's user avatar
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 ...
eugene.it's user avatar
  • 447
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; ...
Choirunnisa Hapsari's user avatar
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 ...
Nick G's user avatar
  • 1,219
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 ...
New2This's user avatar
  • 253
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 ...
Saf's user avatar
  • 13
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 ...
Yaniv's user avatar
  • 157