Hi All,
Can anyone tell me how can I call a client script
(javascript) from Code behind server code (c#)?
Chung 5 7788
You can't. Client scripts run on the client, not the server.
"Chung" <an*****@hotmail.com> wrote in message
news:01****************************@phx.gbl... Hi All,
Can anyone tell me how can I call a client script (javascript) from Code behind server code (c#)?
Chung -----Original Message----- Hi All,
Can anyone tell me how can I call a client script (javascript) from Code behind server code (c#)?
Chung .
Hi, you can do it in this way, for example:
buttonName.Attribute["onclick"] = "javascript :scriptfuntion()";
Good Luck!!!!
Of course, that's not really calling the client-side script from the
code-behind. That's creating a client-side event handler from the server.
The script still is executed client-side.
"Marcelo W. Lopez" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl... -----Original Message----- Hi All,
Can anyone tell me how can I call a client script (javascript) from Code behind server code (c#)?
Chung . Hi, you can do it in this way, for example:
buttonName.Attribute["onclick"] = "javascript:scriptfuntion()";
Good Luck!!!!
Therefore, No way for doing something like this. -----Original Message----- Of course, that's not really calling the client-side
script from thecode-behind. That's creating a client-side event handler
from the server.The script still is executed client-side.
"Marcelo W. Lopez" <an*******@discussions.microsoft.com>
wrote in messagenews:02****************************@phx.gbl... >-----Original Message----- >Hi All, > > Can anyone tell me how can I call a client script >(javascript) from Code behind server code (c#)? > >Chung >. > Hi, you can do it in this way, for example:
buttonName.Attribute["onclick"]
= "javascript:scriptfuntion()"; Good Luck!!!!
.
Correct. See my first reply.
"Chung" <an*****@hotmail.com> wrote in message
news:02****************************@phx.gbl... Therefore, No way for doing something like this.
-----Original Message----- Of course, that's not really calling the client-side script from thecode-behind. That's creating a client-side event handler from the server.The script still is executed client-side.
"Marcelo W. Lopez" <an*******@discussions.microsoft.com> wrote in messagenews:02****************************@phx.gbl... >-----Original Message----- >Hi All, > > Can anyone tell me how can I call a client script >(javascript) from Code behind server code (c#)? > >Chung >. > Hi, you can do it in this way, for example:
buttonName.Attribute["onclick"] = "javascript:scriptfuntion()"; Good Luck!!!!
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Patrick Marti |
last post by:
Does someone know if it is possible do call a jScript-function from the
code-behind (aspx.cs)?
For exemple
// in the aspx.cs
this.ImageButton1.Attributes.Add("onClick","ShowPic(43);");
...
|
by: Hartmut Schroth |
last post by:
Hi,
is it possible to call a Windows function from VB code behind an aspx page? Shell seems not to work??
Task: I want to execute an SQL script for SQL Server and want to avoid to be forced to...
|
by: Brett Robichaud |
last post by:
I understand how code-behind can handle events for a page, but can I call a
code-behind method from within a <script> tag in my ASP.Net page, or can I
only call methods defined in other <script>...
|
by: Antonio |
last post by:
Hi,
I would like to have my TreeNode to call window.close(); without posting
back, how can I do that? At the same time, I prefer to have a SelectAction
property that allows my TreeNode to appear...
|
by: sajithkahawatta |
last post by:
i want to call a java script function from code behind.
in page1.aspx page i placed script'
<script language="javascript">
function SetSelected()
{
infoTextBox.select();
}
</script>
|
by: vksundari |
last post by:
I am executing a select query in a C# component and populating a ASP Grid in Search.aspx.
Now one of the columns in the Grid in Search.aspx is Policy Number(hyper link)
Basicallly I want to call a...
|
by: Mike |
last post by:
Ok, here is my story. I took over a web site that is using the asp.net wizard. This wizard has buttons within it, now, on one of the steps in the wizard I have a drop down. Depending if 'Delete' is ...
|
by: visweswaran2830 |
last post by:
Hi,
I have a function in aspx.vb (code behind fucntion). Now I want to call this function using javascript... How can I call?
|
by: pearlmca |
last post by:
I am using .Net 3.5, withupdatepanel, Its a registration form based on email availability , I call java script function within the button click function,i try a lot but not working.
...
|
by: raulbolanos |
last post by:
I guys, I got 2 days trying to go thought this and I cannot figure out how to solve it, hope you can help me out here.
I have a ASP Web Application, as simple as this;
<%@ Page Language="C#"...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |