how to call java script function in ?

I have working with grid view and get records from database if the records exceding 1000 then I need to display confirm dialog box through javascript ? if click ok then it will display the records in gridview

and if click cancel then it will create a message into label .


want to know where to call java script function on the button that will display this javascript dialog.

4/18/2008 11:29:05 AM 24353 articles. 2 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 47
Get it on Google Play
Get it on Apple App Store


try this...

//Code to get the datasource dataset ds

if(ds.Tables[0].Rows.count > 0)





and you Js should be...

function ShowGridOrLabel()


    if(confirm("Are you sure you want ot show grid") == true)











Software Engineer.
4/19/2008 11:11:49 AM

I want to know about that


I need to check some boolean value either "true" or "false" from this statement


and then on this boolean value I will check the condition.and apply different code. 




4/21/2008 12:21:16 PM

Similar Artilces:

How to call java script function in file)
Hi, i have written following script in aspx file which works fine:  ----------------------------------------------------------------------------------<script type="text/javascript" language="javascript"> function Enable_ddlyear() {  document.form1.TxtStartDate.disabled=true ; document.form1.TxtEndDate.disabled=true ;var x=document.getElementById("ddlyear") x.disabled=false }  function Enable_dates() {document.form1.TxtStartDate.disabled=false ; document.form1.TxtEndDate.disabled=false ;document.form1.ddlyear.disabled=true ; ...

communication between client side(java script) and server side in .net project
I have a question which is, when building a .net project, we are able to use server side code and client side code(java script). How do they communicate? Thanks Client Side coding works with the WebBrowser. So when ever you write client side code you have to keep browser compatability in your mind and you have to code. Server Side code works with Web Server (IIS) and it's ASPNET ISAPI's. The won't directly communicate with each other. But using AJAX you can all server side code from Client Side! Example article on Ajax@

java script function in .net function
Dear All,I’m trying to open up a window with a form in it, but first I need to make sure that the user checked at least one or more item on a list with checkboxes in each row on the page where I push the button to open the window from.I use the following simple code:Public Sub btnLog_onClick(ByVal sender As System.Object, ByVal e As System.EventArgs)           Dim myCsv = getTickedItems(1)         If myCsv = "" Then             Exit Sub  ...

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Client side script calling Server side functions
Hi, I'm currently developing an enabled aspx page that contains a usercontrol (which is based on the listbox but extends it to include icons to represent invalid data). I want the onClick event of the selected TR to call an server function which then populates the controls to the right hand side in the page. Obviously because the row is just rendered HTML overriden from the base class I can only assign a javascript function to the onClick event. So I need a way of calling a server side function that will populate th...

calling server side function from client side script
i have a web form that includes a function named "koko()" in its server side class i want to write a script code in in its HTML script that will be run at the client side, and this client side script will call the function "koko()" from the server side. in brief : i want to call a server side function from a client side script... can you help me in this You can't call server-side code directly from client-side code. You can, however, trigger a postback that your server-side code watches for and triggers the server-side code appropriately. You can do some ...

how to call a c# function if user click on ok button of java script confirm box in .net
hi, i have one problem that is i'm adding the new user to database, if that user is already exist in the database one pop up should display with message like 'user already exists are u sure you want to update the role of the user' with 'yes' and 'no ' buttons on pop up, if user click on 'yes' button then it should call edituser() method of other wise it should reset the selected controls. how to do this using extenal .js file with javascript confirm box   Hi When user click on "Yes" set a hidden field value to be "t...

Can I call a client side\java script function by clicking a menu item from the menu control?
I would like to use the menu control to populate a listview without the menu causing a postback.  Is there  way to call a javascript function by selecting a menu item.  Thanks for any help. HI, You can try to use ClientScriptManager..::.RegisterClientScriptBlock Method to call the client script of the page in the menu's MenuItemClick event. But you shold make sure the menuitems have no navigateUrl, or else the page will redirect to the navigateUrl without postback, so the MenuItemClick  event will not be fired. About the RegisterClientScriptBlock , you refer this...

Call a Java in
hello friends i have a java code that when i press log a box appears the problema i have is that when i press a page i want to call that box from vb.netif is possible ? i use this but obviously doesnt workCall Me.Response.Write("return toggleLogin();") any help If you are using ASP.NET 2.0 Me.Clientscript.RegisterStartupscript(GetType(String), "alert", "<script language=javascript>toggleLogin();</script>") ASP.NET 1.x Me.RegisterStartUpScript("alert","<script language=javascript>toggleLogin();</script>") HC    Haissam Abdul MalakMCAD.NET| Blog | C...

How do I call server side function in client side script without using __doPostBack
Hello, My page has a server side panel that is hidden when the page loaded, checkboxes inside of the datagrid, and buttons.  If at least one checkbox is not clicked and the user click on the button, I show the panel.  When the user click on one of the checkbox, I want to hide the panel.  Onclick on the checkbox I already have a cleint function to change the row color.  I don't want to use __doPostBack.  Don't want to do postback. My question are: How do I either have checkbox onclick called both client and server side functions.  Or have the client side func...

How to call a client side script from a server side script?
Hi guys, I have a Button1_Click function which gets executed on the server side as soon as Button1 is clicked. I have a client side function, test, which is  written in vbscript. I need to call this test function from the Button1_Click function. Can anyone of you please tell me how to do this? The test function is inside an asp:content tag (Please excuse my terminology if I am wrong, I am new to all this).  Thanks and Regards, RJ Have you tried to use the below code Button1.Attributes.Add("onclick","test()"); HCHaissam Abdul MalakMCAD.NET| Blog | Yes, ...

converting to from offered me some sample code when I signed up with them the only problem is the sample code is in but my page that they type all of their credit card into is <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage(""); } private String readHtmlPage(string url) { ...

Call server-side script from client-side script
Hi to all, I would like to ask you How can i call from client-side script a server-side script and to have the result from the server-side script in the client-side script. For example, i wand to call a function writing in server-side (DynaScript) script from a client-side script (JAVASCRIPT) and to have an answer from the function. Thanks in advance. Nick, One way that you could get round this is to write your client script code as you would server script eg. <SCRIPT language=javascript> function getValue()... would be written as: <% psDocument.WriteLn(&...

Calling a sever side code behind sub routine from client side java script
Hi is it possible to call a server side sub routine from client side javascript what I what to do is call a form based email routine from the client, I am hoping that by doing it this way I can disable the button used to call the routine imeadiatly so it's only possible to click it 1 time to prevent the same email being send multiple times, and in addtion start a client routine to indicate the email is underway with some graphic of some sort so the use knows that something is happening, all this is because if the attacment is quite large it takes a little while for the procees to...

Web resources about - how to call java script function in ? -

Talk:Trigonometric functions - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Mathematics , a collaborative effort to improve the coverage of Mathematics on Wikipedia. If ...

Resource sector may outsource finance functions to Asia
Outsourcing financial functions to Asia is one tactic struggling Australian energy and resources companies may use this year to survive the slump ...

Media devices sold to feds have hidden backdoor with sniffing functions
... AMX NX-1200 , a programmable device used to control AV and building systems. The researchers first became suspicious after encountering a function ...

A Non-Sokratic Dialogue on Social Welfare Functions: Hoisted from the Archives from 2003
**[A Non-Sokratic Dialogue on Social Welfare Functions: Hoisted from the Archives from 2003]( ...

Drop Point Knives: Function, Fit, Timeless
Drop Point Knives: Function, Fit, Timeless

Here's how squads and iron sights will function in Rising Storm 2: Vietnam
... roles and create a squad, and the creator can name, lock, or invite others to their little group. The more an outfit fills up, the more functions ...

Don’t tase me, bro: Study shows being shocked by a Taser disrupts brain function
Researchers at Drexel shot a bunch of college students with 50,000 volts. The result? Short-term declines in cognitive function comparable with ...

Slim and Soft Cover-Ups: Protecting Your Laptop with Function and Style
I’m a klutz. My phone has the scars and cracks to prove it. Likewise, my laptop bears scratches and dents in the lid, from me banging it into ...

Macphun Creative Kit 2016 review: Critical photo editing functions delivered in one diverse app
With Creative Kit, Macphun wants to pick up where Apple’s now-defunct Aperture left off. As a plug-in to Photos , Macphun’s apps significantly ...

SAP Ariba CMO Believes There’s No Function More Creative Than Marketing
Get to Know SAP Ariba CMO Alicia Tillman Please visit Marketing Land for the full article.

Resources last updated: 2/12/2016 11:09:02 PM