C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




arguments


Posted Date: 05 Sep 2008      Total Responses: 5

Posted By: Saritha Reddy       Member Level: Silver     Points: 1



how can i pass the arguments to javascript


dim adjbudget as double
i want to pass this varible to javascript






Responses

Author: Appukuttan    05 Sep 2008Member Level: DiamondRating:     Points: 1

Write one javascript function.

Like

function Example(adjbudget)
{
//Here u can what ever u want to do with that variable..
}



Author: Saritha Reddy    05 Sep 2008Member Level: SilverRating:     Points: 1

using vb code behind to javascript


Author: Appukuttan    05 Sep 2008Member Level: DiamondRating:     Points: 2

Yes.

U can call that javascript in code behind like this..

Script = "alert('u r message');window. Example('" + adjbudget + "');";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), Script, true);




Author: ANIL PANDEY    05 Sep 2008Member Level: DiamondRating:     Points: 3

hi,

u can use the varriable like this.....
function IsChecked() // To Check The CheckBox selection
{
var ReturnValue=0;
var RowCount=0;
var ctl = 'grdAdmin_ctl';
RowCount=<%= grdAdmin.Rows.Count %>; //Getting number of rows in gridview
var IsSelectedForRemove=0;
for(var i=2;i<=RowCount+1;i++)
{
var ChkId=null;
if (i<=9)
{
ChkId=document.getElementById(ctl + '0' + i + '_chkSelect');
if (ChkId.checked==true)
{
IsSelectedForRemove=1;
break;
}
}
else
{
ChkId=document.getElementById(ctl + i + '_chkSelect');
if (ChkId.checked==true)
{
IsSelectedForRemove=1;
break;
}
}
}
if (IsSelectedForRemove==0)
{
alert('Please select application(s) to Reject/Approve!');
return false;
}
else
{
return confirm('Are u Sure?');
}
}

here '<% %>' is a server side Code..

Thanks
Anil

Thanks & Regards
Anil Kumar Pandey



Author: Geetha    05 Sep 2008Member Level: GoldRating:     Points: 2

Here i am passing a hiiden filed value to my javascript in page load.
Page.ClientScript.RegisterStartupScript(this.GetType(), "x", "<Script Language=\"Javascript\">var hfParent = document.getElementById(\"" + hfFolder.ClientID + "\");</Script>");



Post Reply
You must Sign In to post a response.
Next : Doubt
Previous : .net framework
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use