Click here to Skip to main content
15,887,083 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: CHECKBOX VALUE Pin
hifiger20044-Apr-07 6:47
hifiger20044-Apr-07 6:47 
AnswerRe: CHECKBOX VALUE Pin
hifiger20044-Apr-07 6:59
hifiger20044-Apr-07 6:59 
QuestionRendering extension as .doc in SSRS Pin
SSSelvi4-Apr-07 3:19
SSSelvi4-Apr-07 3:19 
QuestionHyperLink Pin
vengaqua4-Apr-07 3:19
vengaqua4-Apr-07 3:19 
AnswerRe: HyperLink Pin
N a v a n e e t h4-Apr-07 3:22
N a v a n e e t h4-Apr-07 3:22 
AnswerRe: HyperLink Pin
rujuc#4-Apr-07 3:24
rujuc#4-Apr-07 3:24 
QuestionCreating Fundraising Thermometer in asp.net using c# Pin
ukrajudotnet4-Apr-07 3:01
ukrajudotnet4-Apr-07 3:01 
QuestionDeclaring a javascript function Pin
Alice@mywonderland4-Apr-07 3:01
Alice@mywonderland4-Apr-07 3:01 
I'm trying to add a small (tiny!) javascript function to my ASP project.

I'm using 2.0 and C#. My site uses Master pages so I don't think I can directly edit the element.

The following shows my master page, to which I'm trying to add a javascript function - just for testing at the moment.

2 questions -
1) The current code gives a CS0246 error - "The type or namespace name 'function' could not be found (are you missing a using directive or an assembly reference?)" for both 'var' and 'function. What do I need in order to declare functions this way?
2) Given that I can't edit the element, how do I actually call the function? Do I call it from within the Page_Load event?

Many thanks,
Alice

<%@ Master Language="C#"%>






var str = "This is the test string.";
function myFunction()
{
str+=" The string was changed by myFunction. ";
return (str);
}

protected void Page_Load(object sender, EventArgs e)
{
}


<title>Page title

AnswerRe: Declaring a javascript function Pin
kubben4-Apr-07 3:11
kubben4-Apr-07 3:11 
GeneralRe: Declaring a javascript function Pin
Alice@mywonderland4-Apr-07 3:43
Alice@mywonderland4-Apr-07 3:43 
GeneralRe: Declaring a javascript function Pin
Not Active4-Apr-07 4:39
mentorNot Active4-Apr-07 4:39 
GeneralRe: Declaring a javascript function Pin
Not Active4-Apr-07 3:46
mentorNot Active4-Apr-07 3:46 
GeneralRe: Declaring a javascript function Pin
kubben4-Apr-07 3:48
kubben4-Apr-07 3:48 
AnswerRe: Declaring a javascript function Pin
Not Active4-Apr-07 3:42
mentorNot Active4-Apr-07 3:42 
GeneralRe: Declaring a javascript function Pin
Alice@mywonderland4-Apr-07 4:17
Alice@mywonderland4-Apr-07 4:17 
GeneralRe: Declaring a javascript function Pin
Not Active4-Apr-07 4:34
mentorNot Active4-Apr-07 4:34 
GeneralRe: Declaring a javascript function Pin
Alice@mywonderland4-Apr-07 5:21
Alice@mywonderland4-Apr-07 5:21 
GeneralRe: Declaring a javascript function Pin
Not Active4-Apr-07 5:27
mentorNot Active4-Apr-07 5:27 
GeneralRe: Declaring a javascript function Pin
Alice@mywonderland4-Apr-07 5:51
Alice@mywonderland4-Apr-07 5:51 
GeneralRe: Declaring a javascript function Pin
Not Active4-Apr-07 6:12
mentorNot Active4-Apr-07 6:12 
AnswerRe: Declaring a javascript function Pin
Guffa4-Apr-07 5:15
Guffa4-Apr-07 5:15 
Questionregisteration for MSDN Subscriptions Pin
siddisagar4-Apr-07 2:22
siddisagar4-Apr-07 2:22 
QuestionIssues in Word Automation [modified] Pin
Jijesh.V.R4-Apr-07 1:52
Jijesh.V.R4-Apr-07 1:52 
QuestionHow to make servers masterpage or main page for multiple applications Pin
Lappalainen Antti4-Apr-07 1:47
Lappalainen Antti4-Apr-07 1:47 
Question.Net 2.0 - Calling Page method from User control or Master Page Pin
shyamts4-Apr-07 1:12
shyamts4-Apr-07 1:12 

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.