|
I have written following lines of code in javascript
function a()
{
var instance =new ActiveXObject("testDll.Class1");
document.write(instance.hello())
}
where testDll is a dll which i have registered and Class1 is its function
It gives me error "Automation server can't create object"
I cannot understand that why i m receiving this error Is there any mistake in my code or whats solution??
|
|
|
|
|
|
How i can call a dll function in javascript??
|
|
|
|
|
Use AJAX.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
If the DLL exposes an automation interface, and you're running in an environment that allows access to this (IE with certain configurations), you can make calls to the DLL that way.
In general, it's a bad idea to rely on being able to call native code when designing for the web. Find another means of accomplishing what you need.
|
|
|
|
|
MimeMultipart multipart=new MimeMultipart("alternative");
MimeBodyPart contype=new MimeBodyPart();
contype.addHeaderLine(
"MIME-Version: 1.0; Content-Type:mutipart/alternative; boundary=boundrytexthtml");
MimeBodyPart plainPart = new MimeBodyPart();
plainPart.addHeaderLine(
"--boundarytexthtml; Content-Type: text/plain; charset=\"iso-8859-1\"");
plainPart.setText(textstr.toString());
plainPart.addHeaderLine(
"--boundarytexthtml; Content-Transfer-Encoding: quoted-printable");
MimeBodyPart htmlPart = new MimeBodyPart();
htmlPart.setContent(htmlstr.toString(), "--boundarytexthtml; text/html; charset=\"iso-8859-1\"");
htmlPart.addHeaderLine(
"--boundarytexthtml; Content-Type: text/html; charset=\"iso-8859-1\"");
htmlPart.addHeaderLine(
"Content-Transfer-Encoding: quoted-printable; --boundarytexthtml--");
multipart.addBodyPart(contype);
multipart.addBodyPart(plainPart);
multipart.addBodyPart(htmlPart);
BodyPart embedImage=new MimeBodyPart();
Enumeration ken = imgHash.keys();
Enumeration ven=imgHash.elements();
while(ken.hasMoreElements() || ven.hasMoreElements())
{
key = (String) ken.nextElement();
value=(String) ven.nextElement();
System.out.println(key+" : "+value);
String URLDataString="file:"+value;
DataSource ds=new URLDataSource(new URL(URLDataString));
embedImage.setDataHandler(new DataHandler(ds));
embedImage.setHeader("Content-ID","<key>");
multipart.addBodyPart(embedImage);
}
message.setContent(multipart);
message.setSentDate(new Date());
Transport.send(message);
} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Regards,
Deepak More
Software Developer
Mumbai
|
|
|
|
|
Hi all,
I really need to convert the C# code below into VB. If possible can advise me where is the most approriate place to place this portion of code. The code is to wire the parent datagrid for the ItemCreated event and ItemDataBound event.
Please help me.
private void InitializeComponent()<br />
{<br />
this.load += new System.EventHandler(this.Page_Load);<br />
this.dgRegion.ItemCreated += new DataGridItemEventHandler(dgRegion_ItemCreated);<br />
this.dgRegion.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.dgRegion_ItemDataBound);<br />
}
Thanks in advance,
Chiari
|
|
|
|
|
This is just code to bind event handlers. VB does this by itself. I believe the way to do it would be to use:
Handles Page.Load
Handles dgRegion.ItemCreated
Handles dgRegion.ItemDataBound
for the respective methods.
|
|
|
|
|
http://www.carlosag.net/Tools/CodeTranslator/Default.aspx
This might help u. Check it
Srinu
|
|
|
|
|
hi, i have just created a virtual earth website and would lyk to create a drawing tool to be able to draw shapes on the map.
i came across this website,
<title>Untitled Page
function myDrawFunction()
{
var a = document.getElementById("textBox1").value;
var b = document.getElementById("textBox2").value;
var c = document.getElementById("textBox3").value;
var d = document.getElementById("textBox4").value;
alert("The value of a,b,c,d= "+a+","+b+","+c+","+d);
jg_doc.setColor("#00ff00"); // green
jg_doc.fillEllipse(a, b, c, d);
//jg_doc.drawLine(a,b,c,d); // co-ordinates related to the document
alert("The value of a,b,c,d= "+a+","+b+","+c+","+d);
jg_doc.setColor("red");
jg_doc.drawPolyline(new Array(50, 10, 120), new Array(10, 50, 70));
jg_doc.paint(); // draws, in this case, directly into the document*/
}
var jg_doc = new jsGraphics(); // draw directly into document
var jg = new jsGraphics("myCanvas");
var jg2 = new jsGraphics("anotherCanvas");
//doc.myDrawFunction();
SOMEONE HELPPPPPPP... thanz
|
|
|
|
|
I need to launch a windows form from a CGI, someone can help me?
Thanks.
|
|
|
|
|
The CGI program runs on the server. If you could launch a Windows program, it would run on the server hidden form the client. It will not run on the client's machine. Anyway, launching a Windows program would be a clear security violation of the client's machine. Nevertheless, you can get close to what you want with .NET's smart client (.NET Framework has to be installed on the client).
|
|
|
|
|
Hi,
Currently I am running an ASP based intranet site that utilizes a older VB6 activex control.
This control reads system info, registry, apps, etc. and posts them back to the site to be evaluated and display the appropriate items according to the results. I would like to to build this solution in ASP.NET but build a dll that can be accessed from web code instead of running and posting back to the site. I have looked for example code but really haven't found any that sheds light on what I want to do. Any assistance would be greatful.
CA
-- modified at 13:53 Monday 20th February, 2006
|
|
|
|
|
fafsfaf wrote: I would like to to build this solution in ASP.NET but build a dll that can be accessed from web code instead of running and posting back to the site.
Could you explain this? What are you referring to when you say "accessed from web code"?
|
|
|
|
|
To clarfy, the client currently visits the page and downloads the activex control that runs with a timer that gathers the information and posts back to another page depending on the results as determined by the activex control. I guess I am looking for a way to build the site that would have some web control that gets installed on the client then can be called from the web page, if I can even do this. I am trying to move most of the processing to the site instead of the client where authentication issues are starting to arise. I am not really just starting out with programming and this is a very large undertaking for me. I have been looking at different literature on the subject but I am wondering do I use SOAP or will the ASP.NET give me the ability to accomplish this. I just alittle over my head on this one and wanted some advise on where to start.
Thanks
CA
|
|
|
|
|
However you do it, you're going to have authentication issues. Anything that you install on a client from a webpage is going to require assent from the user. If this is in a corporate environment, can you be assured that the user will agree? If not, you may want to look at other options, such as embedding a .NET based service into the OS build image that will automatically post information up to any back-end databases you may have on a periodic basis.
If this is not in a corporate environment - good luck! I know that I certainly wouldn't be allowing an activeX control to install that scans registry and installed applications.
|
|
|
|
|
I have two project,one is ASP,and another is ASP.NET.
And in the loggin page of ASP.NET project,username,password and valid code is necessary.
Because I want to loggin ASP.NET project in the ASP project,Now I need add a loggin fuction in a page of ASP project(And ASP project doesn't need loggin).
But I don't know how to do it,can you help me?
Thanks a lot.
Bright Zhang
|
|
|
|
|
Boys and Girls,give me a hand.
Thanks.
|
|
|
|
|
O,I'm sorry,nobody comes here.
But I've resolved it by ViewState(__VIEWSTATE).
|
|
|
|
|
Store UserName and Password in Session and share the session variable with these two application with the use of intermediate program.
Mohamed Naseer
|
|
|
|
|
Hello,
we have a complex asp.net web application, including many parts - both usual (binaries, aspx-pages, scripts, other resources; DB; configuation section) and advanced, like several windows-service, transactional message queues an so on..
I look for some uniform way/technology to update all these things - all parts entirely, all just some of them.. preferrable with minimal timetable and inconvenience for online-users..
Thanks
|
|
|
|
|
As far as I know, you will have to interrupt your clients to make updates to this complex application. However, I would determine when there is a low usage period, schedule updates at this time, and annouce to your users well ahead of the scheduled maintenance your intentions. Make sure you back up everything; so, if something goes wrong, you can restore the old code.
|
|
|
|
|
Thanks, George,
but maybe is there some tool to make this tasks automated? Our goal is simplifification of an update task (without detriment to safety, data integrity and so on) - because person who would make updates can be different than developers and updates in manual mode has more chances to produce errors and data losses
In general, we need some tool that allows to create some script for update and allows to make updates, where possible, in 'hands-free' mode.
Of course, simply tasks (updates for web-application binaries, aspx-pages, resources) can be performed with help of Windows Installer - but we need to update database, windows service, some assemblies in GAC (which used by all components of application). Besides, we cannot reinstall windows-service - and need to directly update only its binaries.
Of course, these tasks aren't very complicated for developers to do, but sooner or later apllication may go to customers, and customer support should have an easy way to handle all these tasks (because they won't have deep knowledge of the application, at least in the beginning)
Hope, it makes sense,
Thanks in advance.
|
|
|
|
|
Is it possible to parse the CSS of an HTML document using MSHTML ?
I need to get the css style assigned to any element from the html.
When the style is written inside the element's tag, then its structure is contained in "style" attribute of that element (e.g.: node.getAttribute("style") contains the structure of the css style of the 'node' element).
However if the element refers to an outside CSS class (e.g. - refers to class main) then the mshtml control doesn't seem to offer the possibility to parse the "main" style like in the above case.
Can anybody help me ?
Thanks.
|
|
|
|
|
Check out the currentStyle property.
|
|
|
|