convert ASP (Server.CreateObject) to .NET

bringyoutolife

New Member
HI, Did anyone knows how to do codeBehind in .NET from the ASP codes below?<BR><BR>(ASP Examaple code: )<BR><BR>Set LEAD12 = Server.CreateObject("LEAD.LeadCtrl.121")<BR>remoteID = Request.ServerVariables("REMOTE_ADDR")<BR>count = Session("counter")<BR> <BR> LEAD12.Load LOCAL_ROOT & "image1.cmp", 0, 0, 1<BR> LEAD12.Save LOCAL_ROOT_TEMP & "\" & fileName, FILE_JFIF, 24,2,0<BR><BR>Thanks.it is pretty different in .net. You first must create a reference to your dll. Once you have that the you can dim it in it's own type:<BR><BR>dim lead2 as lead.leadctrl.121<BR><BR>hthThanks Omny :)<BR>But do you meant that I don't have to set the Lead12 as server.CreateObject??<BR>how is it actually??<BR>Thanks!<BR><BR>Set LEAD12 = Server.CreateObject("LEAD.LeadCtrl.121") <BR>remoteID = Request.ServerVariables("REMOTE_ADDR") <BR>count = Session("counter") <BR> <BR> LEAD12.Load LOCAL_ROOT & "image1.cmp", 0, 0, 1 <BR> LEAD12.Save LOCAL_ROOT_TEMP & "\" & fileName, FILE_JFIF, 24,2,0 <BR>
 
Back
Top