|
Hi,
I need to load a dll with javascript.
I already succeeded in loading object with a ClassId via the:
var mydll = new ActiveXObject("App.ClassID"); You probably can use the CreateObject function as well.
Now I need to plug-in another dll, which is a .NET assembly. I can't find any clsID in the registry and can't find anything to load the dll. I think there is a function LoadLibrary available, but I have no idea how to use it.
So how can I load a dll with javascript with only knowing the filename?
I hope somebody can help me.
tnx in advance !
PS: the dll in question contains stuff for printing data and runs locally. (so no funky stuff with virusses, trojans, etc)
|
|
|
|
|
V. wrote: LoadLibrary available,
LoadLibrary is not available to Javascript. You must use COM objects. Besides you can't "load" a .NET assembly using LoadLibrary yourself, the platform must do the loading.
It sounds like you need your .NET objects to be exposed as COM objects. This can be done by creating a COM-callable wrapper, see this MSDN article[^]
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
thanks a lot for the article !
|
|
|
|
|
Is it possible to send a post that contains an uploaded file without letting the user select the file using the "InputFile" HTML control? with AJAX or javascript? (The user doesnt even browse for the file)
Thanx!
|
|
|
|
|
Nope.
Only with java (and maybe activex)
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
ok,
with activeX control that resides in a web page, how can I post a file?
|
|
|
|
|
Hi Friends
I am creating a web service to use bot in asp and asp.net.
its working in both but problem is
it returns long string or text value while i want to return values in the form array
my servcice is like this
publi string[] getinfo(int companyid){
string[] myInfo=new string[2];
myInfo[0]="My Company";
myInfo[0]="Address1";
myInfo[0]="Address2";
return myInfo;
}
i am using in asp
Response.Writ(xmlhttp.responseText)
this statement is giving me resut
My Company
Address1
Address2
I want to store these values in different variables to for the future use,
any one can help me please.
how can i put those values in variables.
Naveed Kamboh
|
|
|
|
|
Hi
Can you please use XML for output so that you can parse the XML in the asp or asp.net pages and store you output in variables
Regards
Tushar kothari
|
|
|
|
|
thanks
how can i do that? any article or coded pls
thanks in advance
Naveed Kamboh
|
|
|
|
|
Hi
You can return XML node from the Web Method and then on other end you have to store that XML node and after parsing you will get the values.
Following is the sample code for that
<web method="">
public function A() as XMLNode
dim XND as new XMLNode
.....your code....
.....Store the output in the XML Node
return XND
On ASPX page
dim XNDC as XMLNode
XNDc = <webservice object="">.A()
Then you can parse the xml node
for you outout
Regards
Tushar kothari
|
|
|
|
|
I have to call Web Method from ASP Pages. But I don’t want to wait for output of the web method. So I had tried to call it Asynchronous call using begin and end. But still it is waiting.
What methodology should I apply so that I can get my goal.
Tushar kothari
|
|
|
|
|
Hi folks,
I want to ask how can I make a simple html editbox unreadable - if there is another
object type or setting
thanx
|
|
|
|
|
Try:
<input type="text" readonly>
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I'm a C# WinForms developer who decided to be cool and make a personal website on a popular ASP.NET host.
Unfortunately, nobody can sell me artistic skill, so I was wondering if anyone could help me find some good templates, .css files, etc. that could help me along.
|
|
|
|
|
|
Hey,
I am about to launch a information website in that I hope to make money from internet advertising. I am really new to advertising on the net and have a few questions.
First how do you prove how many hits your site gets? If someone wants to advertise on my site, surely just telling them how many hits I get isnt good enough, as I could be making up the total. So whats the general practice for this?
The second question is should I handle all the advertising myself? Do I just talk with the client, obtain a banner from them and charge them, all are there services out there that can help with this process?
Thanks very much for your time, would appreciate any feedback.
cheers.
|
|
|
|
|
I found a really useful tool the other day called Google Analytics - it takes data from your site such as who is visiting it, for how long, which pages, at what resolution and where etc etc - very detailed.
Sign up for an acconut - analytics.google.com - they always get flooded with requests, but it seems like they have enough now.
Hope that helps
James
http://www.jamesgupta.com
Website
Design | Maintenance | Hosting
|
|
|
|
|
tmoney101 wrote: The second question is should I handle all the advertising myself? Do I just talk with the client, obtain a banner from them and charge them, all are there services out there that can help with this process?
I'd do both. Check out Google AdSense https://www.google.com/adsense/afc-online-overview[^] and also try to get your own advertisers, like CP does.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I have a problem with WebServices, I tried to learn about it from the MSDN and followed the following steps:
To create a Web service
1. Open Visual Web Developer.
2. On the File menu, click New Web Site.
The New Web Site dialog box appears.
3. Under Visual Studio installed templates, click ASP.NET Web Service.
4. Click Browse.
5. Click Local IIS.
6. Click Default Web Site.
7. Click Create New Web Application.
Visual Web Developer creates a new IIS Web application.
8. Type the name TemperatureWebService.
9. Click Open.
The New Web Site dialog box appears, with the name of the new Web site in the right-most Location list. The location includes the protocol (http://) and location (localhost). This indicates that you are working with a local IIS Web site.
10. In the Language list, click the programming language that you prefer to work in.
11. Click OK.
Visual Web Developer creates the new Web service and opens a new class named Service, which is the default Web service. However, in the following procedure you will create a new Web service with a specified name and you will not use the Service class.
12. Close the Service class.
The problem:
After I finish step no. 11 this message is displayed:
"Configuring website 'http://localhost/MyWebService' to ASP.NET 2.0 faild. You need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly".
What should I do? Knowing that I have done the setup of the IIS.
Tamatem
|
|
|
|
|
Open the properties for the web application in the IIS manager, go to the ASP.NET tab and select framework 2.0.
---
b { font-weight: normal; }
|
|
|
|
|
Hi ,
I am supposed to develop a web application in .Net 2.0, which should convert a file of any print support type to TIFF, JPEG, PDF and Text format on demand.
Please suggest me how can accomplish this task.
Thanks and Regards,
Raj.
|
|
|
|
|
|
Error Type:
Microsoft JET Database Engine (0x80040E21)
Index or primary key cannot contain a Null value.
/Poonam/updated.asp, line 73
----------------------------------------------------------------------------
this is my update file
<% dim month, day, year, gender,OStats,DStats,SStats,arrVals,arrAll,rs,usr,strSql,strdes,strinter,strfavm,strquote,strfavs,status
gender = Request.Form("Gender")
month = Request.Form("DOBMonth")
day = Request.Form("DOBDay")
year = Request.Form("DOBYear")
'arrAll = split(Request.Form ("allBoxes"), ",")
'get the array with the id's that were ticked
'arrVals = split(Request.Form ("chkbox"), ",")
'rs("Looking to")= '& arrVals &'
Looking = Trim(Request.Form("ckbox"))
status = Request.form("lovestatus")
OStats = Request.Form("orientationStatus")
DStats = Request.Form("drinkerStatus")
SStats = Request.Form("smokerStatus")
strdes = Request.Form("description")
strinter = Request.Form("interests")
strfavs = Request.Form("favoriteSongs")
strfavm = Request.Form("movies")
strquote = Request.Form("quote")
'Build connection
usr=Request.QueryString("nm")
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("users.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
'Open record with entered username
rs.Open "select * from userlist where username='"& usr &"'", conn, 3, 3
rs.AddNew
rs("username") = usr
rs("password") = var
rs("fullname") = var2
rs("country") = var3
rs("fld_question") = var4
rs("fld_answer") = var5
rs("fld_email") = var6
rs("fld_visitor_ID") = var7
rs("dd") = day
rs("mm") = month
rs("yy") = year
rs("Status") = status
rs("Looking_to") = Looking
rs("Gender")=gender
rs("Favourite_Quote")= strquote
rs("Favourite_Movie")= strfavm
rs("Favourite_Bands") = strfavs
rs("Sexual_Orientation") = OStats
rs("Smoker") = SStats
rs("Drinker") = DStats
rs("Interests") = strinter
rs("About_me") =strdes
'Save record
rs.Update
set rs=nothing
set conn=nothing
%>
|
|
|
|
|
Hi
Thsi is posible only when you PK Field is Identity or some before insert trigger is taking the responsibility of updating the PK filed.
Regards
Tushar kothari
|
|
|
|
|
Is it possible to create a system.data.datatable or dataset from an excel worksheet that is obtained using interop.excel in C#?
The code is as following. As you can see, I can read/modify certain cell, but is it possible to convert the table to a System.data.datatable? Or at least print out the select range in the excelworksheet?
using System;
using Excel;
protected void OpenExcelSpreadSheet(string input)
{
Excel.Application excelApp = new Excel.ApplicationClass();
excelApp.Visible = false;
Excel.Workbook newWorkbook =
excelApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
// The following code opens an existing workbook
object Missing = System.Reflection.Missing.Value;
string workbookPath= "myFile.xls";
Excel.Workbook excelWorkbook =
excelApp.Workbooks.Open(workbookPath,Missing,Missing,Missing,
Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing);
// The following gets the Worksheets collection
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
// The following gets Sheet1 for editing
string currentSheet = "Sheet1";
Excel.Worksheet excelWorksheet = (Excel.Worksheet)excelSheets.get_Item(currentSheet);
// The following gets cell A1 for editing
Excel.Range excelCell = (Excel.Range)excelWorksheet.get_Range("A1", "A1");
excelCell.Value2 = input;
Excel.Range excelTable = (Excel.Range)excelWorksheet.get_Range("A1", "A27");
int noOfRow = excelTable.Rows.Count;
int noOfColumn = excelTable.Columns.Count;
Response.Write("Table has " + noOfRow + " rows and " + noOfColumn + " columns.
");
}
|
|
|
|