I created application of type class library to open RDP
and i want to embed this windows application into a web application but i need to pass server name ,user name and password to the dll as a parameters.
i know that i can use object tag to embedd dll in a web page and PARAM to pass parameters but what i need is to make PARAM value passed by code not static in ob开发者_Go百科ject tag
<OBJECT id="MyWinControl1" height="200" width="200" classid="http:rdp.dll#rdp.rdpControl.cs" VIEWASTEXT>
<PARAM NAME="IP" VALUE="need to pass it by code from Web page" >
how can i do this?
i am using C# ASP.NET 2008
<PARAM NAME="IP" VALUE=<%=value_from_codebehind%> >
codebehind:
//define string named value_from_codebehind
public string value_from_codebehind;
after that u can assign values to the value_from_codebehind
value_from_codebehind = "\"passing_value\"";
and this "passing_value"
with quotas will go to <%=value_from_codebehind%>
, i.e. u will get
<PARAM NAME="IP" VALUE="passing_value" >
精彩评论