Click here to Skip to main content
15,892,927 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralProblem with AjaxControlToolkit CalendarExtender with TextChanged in a datagrid. Pin
thomasa6-Dec-07 2:20
thomasa6-Dec-07 2:20 
GeneralRe: The Solution Pin
thomasa6-Dec-07 3:34
thomasa6-Dec-07 3:34 
Questionhow i can use a cursor for a multi set return values in a stored procedures Pin
jagan1236-Dec-07 1:56
jagan1236-Dec-07 1:56 
AnswerRe: how i can use a cursor for a multi set return values in a stored procedures Pin
Paddy Boyd6-Dec-07 2:18
Paddy Boyd6-Dec-07 2:18 
Questionregarding pblm in creating virtual directory Pin
GaneshKumarVkm6-Dec-07 1:42
GaneshKumarVkm6-Dec-07 1:42 
GeneralRe: regarding pblm in creating virtual directory Pin
Sathesh Sakthivel6-Dec-07 1:53
Sathesh Sakthivel6-Dec-07 1:53 
GeneralRe: regarding pblm in creating virtual directory Pin
martin_hughes6-Dec-07 4:23
martin_hughes6-Dec-07 4:23 
Questioncalling javascript from c# Pin
ekynox6-Dec-07 1:27
ekynox6-Dec-07 1:27 
hi guys,

I am stuck on the issue of being able to call a javascrip function from my c# code.
This is my javascript:
<br />
  <SCRIPT LANGUAGE="JScript"><br />
    function showPosition()<br />
    {<br />
        var oElement = document.all.resultPanel;<br />
        return oElement.offsetLeft;<br />
    }<br />
  </SCRIPT><br />


The javascript itself works fine, the problem comes down to how do I call my javascript in c#. This was my attempt:
<br />
        private void CallJavascript()<br />
        {<br />
            string popupScript = "<SCRIPT LANGUAGE='JScript'>" + "function showPosition(){ var oElement = document.all.resultPanel; return    oElement.offsetLeft;}</SCRIPT>";<br />
            Page.RegisterStartupScript("PopupScript", popupScript);<br />
            Label1.Text = popupScript.ToString(); //this is wrong<br />
        }<br />


Can someone please help me correct the CallJavascript() method.

thanks
GeneralRe: calling javascript from c# Pin
jagan1236-Dec-07 1:42
jagan1236-Dec-07 1:42 
GeneralRe: calling javascript from c# Pin
ekynox6-Dec-07 2:05
ekynox6-Dec-07 2:05 
GeneralRe: calling javascript from c# Pin
jagan1236-Dec-07 2:08
jagan1236-Dec-07 2:08 
GeneralRe: calling javascript from c# [modified] Pin
ekynox6-Dec-07 2:23
ekynox6-Dec-07 2:23 
Questionhow to convert text, from english to other language using asp.net Pin
Member 41706456-Dec-07 1:10
Member 41706456-Dec-07 1:10 
AnswerRe: how to convert text, from english to other language using asp.net Pin
Sathesh Sakthivel6-Dec-07 1:26
Sathesh Sakthivel6-Dec-07 1:26 
AnswerRe: how to convert text, from english to other language using asp.net Pin
Michael Sync6-Dec-07 1:29
Michael Sync6-Dec-07 1:29 
QuestionHow to put javascript validation on ASP .NET controls? Pin
Rocky#6-Dec-07 0:58
Rocky#6-Dec-07 0:58 
AnswerRe: How to put javascript validation on ASP .NET controls? Pin
N a v a n e e t h6-Dec-07 1:08
N a v a n e e t h6-Dec-07 1:08 
GeneralOpen a new window Pin
.NET- India 6-Dec-07 0:56
.NET- India 6-Dec-07 0:56 
GeneralRe: Open a new window Pin
Michael Sync6-Dec-07 1:24
Michael Sync6-Dec-07 1:24 
GeneralRe: Open a new window Pin
.NET- India 6-Dec-07 1:51
.NET- India 6-Dec-07 1:51 
GeneralRe: Open a new window Pin
Michael Sync6-Dec-07 3:21
Michael Sync6-Dec-07 3:21 
Questionhow to get a multi row result set from a stored procedures Pin
jagan1236-Dec-07 0:54
jagan1236-Dec-07 0:54 
Generalchild Grid Pin
wasimsharp6-Dec-07 0:48
wasimsharp6-Dec-07 0:48 
QuestionHow to Calculate AGE? Pin
Kasi Viswanathan6-Dec-07 0:40
Kasi Viswanathan6-Dec-07 0:40 
AnswerRe: How to Calculate AGE? Pin
Sathesh Sakthivel6-Dec-07 1:29
Sathesh Sakthivel6-Dec-07 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.