.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

how to pass parameter

Posted By: saravanan     Posted Date: April 18, 2013    Points:5   Category :C#
my code

<head runat="server">
<title></title>
<script language="JavaScript" type="text/javascript">
function RunNotePad(bentle) {

var oShell = new ActiveXObject("WScript.Shell");

var prog = document.getElementById(bentle).value;

oShell.ShellExecute(prog, "", "", "open", "1");
}

</script>


</head>

protected void btnopenmicro_Click(object sender, EventArgs e)
{
string para_bentleypath = "c:\programfiles\ustation.exe"
ClientScript.RegisterStartupScript(typeof(Page), "Message", "<script type='text/javascript' language='javascript'>RunNotePad(para_bentleypath) ;</script>");

}


please check this above code and give me the solution how to pass the parameter. its not working for me

Responses
Author: rameshbabu             
Posted Date: February 10, 2014     Points: 20   

Use below code in server side,

protected void btnopenmicro_Click(object sender, EventArgs e)
{

ScriptManager.RegisterStartupScript(this, this.GetType(), "Message", "<script type='text/javascript' language='javascript' defer='true'>RunNotePad(para_bentleypath);</script>", false);
}


Best Regards,
Ramesh Babu.S


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend