|
Hello all,
I have a problem using activex in my asp.net webpage..
I have developed an activex control code:
Public str As String
Public lastpath As String
Event Acceptpath(str As String)
Private Sub Drive1_Change()
Dir1.path = Drive1.Drive
End Sub
Private Sub Submit_Click()
Text1.Text = Dir1.path
RaiseEvent Acceptpath(Dir1.path)
End Sub
Public Property Let Last(path As String)
lastpath = path
PropertyChanged "Last"
MsgBox (lastpath)
End Property
Public Property Get Last() As String
Last = lastpath
End Property
'Public Property Let Last(path As String)
'lastpath = path
'PropertyChanged "Last"
'End Property
Private Sub Last_Click()
Dir1.path = lastpath
MsgBox (lastpath)
End Sub
Private Sub UserControl_Initialize()
Dir1.path = "E:\Myproject\controls"
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
lastpath = PropBag.ReadProperty("Last")
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Last", lastpath)
End Sub
I have created the CAB file and added to the asp.net page so I can see activex in my page when i run the code but when I send values to the activex control it is not showing any thing.. ASP.Net web code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<code>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>My ActiveX control<title>
</head>
<body>
<OBJECT ID="UserControl1"
CLASSID="CLSID:A9CC0BA6-38B7-4CCA-9244-648EA26F5FD1"
codebase="Project1.CAB#version=1,0,0,0>
<PARAM name="Last" value="E:\myproject" /></OBJECT>;
<form id="form1" runat="server">
</form>
</body>
</html>
any help with this code...
So that i can send the values and retrive from Activex...
Thanks
MSK
|
|
|
|
|
|
The properies for the link to the file in the setup project's file system view contain an "icon" field that lets you select the icon you want to show.
Be aware that the icon must be either copied as a separate file to the installation directory or embedded in the exe - the dialog box you bring up from the "icon" property will let you select one of these.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
|
I hope I understood correctly what you need - to set the icon shown in the Programs menu for your executable.
You can find the "Icon" property this way:
- right click on the setup project's name in the Solution Explorer
- click on "View" and then on "File System"
- in the File System view select "User Program's Menu"
- locate the link to your executable, which will usually be under a folder in "User Program's Menu", and select it
- the "Properties" tab will now show the link's properties, including "Icon"
Hope it's all clear and it's what you need.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
|
Collin Jasnoch wrote: It would be nice if the icon propogated over from the actual project... but I guess you can only ask for so much from MS.
Too true! It's just nonsense that the icon is not taken automatically from the exe.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Hi,
I've been asked to port a .net 1.1 application with entlib of january 2006 to .net 3.5 with entlib 4.1. It seems most things are transported okay, but some classes inherit from the ProviderData class. I am unable to locate it in the 4.1 package. I tried google, but somehow my googling skills have abandoned me.
The ProviderData class is present in entlib2006 under Microsoft.Practices.EnterpriseLibrary.Configuration. (believe it's entlib version 1.1 as I don't have the installed packages, I only have a bunch of solution files with references).
Anyone knows where I can find it now or what action I should take to work around this problem?
The consumer isn't a moron; she is your wife.
|
|
|
|
|
I found some code on the net that allows me to export a dataset/datatable to Excel, and as far as I know the code works (it actually creates a XML file with a ".xls" extension.
However, when I try to open the file in Excel, it displays as an XML file. The first part of the file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<ss:Workbook xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<ss:Styles>
<ss:Style ss:ID="General" />
<ss:Style ss:ID="Number">
<ss:NumberFormat ss:Format="General Number" />
</ss:Style>
<ss:Style ss:ID="DateTime">
<ss:NumberFormat ss:Format="General Date" />
</ss:Style>
<ss:Style ss:ID="Currency">
<ss:NumberFormat ss:Format="Currency" />
</ss:Style>
<ss:Style ss:ID="ShortDate">
<ss:NumberFormat ss:Format="Short Date" />
</ss:Style>
</ss:Styles>
<ss:Worksheet ss:Name="Sheet1">
<ss:Table>
<ss:Row>
<ss:Cell>
In Notepad, the VS IDE, and Word, the xml appears exactly as you see it above. In Excel, there's a few weird characters preceding the first < character - I don't know if this is an indication of what's wrong, but I thought I'd mention it. Can anyone help?
EDIT===============================================================
I also tried to use DataSet.WriteXML, and that file acts the same way.
I also tried opening the file in OpenOffice and it does the same thing as Excel.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Tuesday, August 18, 2009 9:18 AM
|
|
|
|
|
What version of Excel are you using? I just tried to load your XML in Excel 2002, and it doesn't show any strange characters at the start. When I enter some data and save, the structure gets modified to this;
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">Hello</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>1</ActiveRow>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook> This seems to work on both 2002 and 2007, but Excel punishes me whenever I try to remove the header. I'm guessing that that's not the problem, and that your document is somehow not encoded as UTF-8. Have you copied/pasted fragments across a language-barrier?
The computer is mightier than the pen, the sword, and usually the programmer.
modified on Tuesday, August 18, 2009 2:29 PM
|
|
|
|
|
Hi Guys -
I've been experimenting with MSBuild, and in my quest for meaninful output, have found an odd problem with displaying messages:
I have the following section:
<Target Name="MyAfterBuild">
<Message Text="==================MESSAGE=================="/>
<Warning Text="==================WARNING=================="/>
<Error Text="==================ERROR=================="/>
<Target/>
Which displays an Error Message, a Warning Message, but no normal Message in the error list.
I have set the MSBuild output to Max, and set the message Importance to High, but still it is not displaying any output. What can i do to fix this?
Regards
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
modified on Tuesday, August 18, 2009 6:52 AM
|
|
|
|
|
Hi all,
I want to know how we can change JIT compiler for our application. As per my knowledg when we use VS.Net IDE, we get a standard JIT. What if I want pre-JIT or econo-JIT? How I can change mode of compilation.....
|
|
|
|
|
|
|
I am using VB.net, but samples in any language will do.
The problem is that I have to connect to a secure site with an invalid certificate. Every browser based control fails, so I have turned to raw sockets. The website is for internal use only, however its certificate is unverified.
I need to know what commands to send and how to respond over https. My socket app, so far, can connect to http, and even view pages. On https, any command like GET /url?parameters HTTP/1.1 gives me an empty response.
Thanks in advance.
~ Soumya92
|
|
|
|
|
|
I tried that now, and it works. But now I cannot send any POST commands.
~ Soumya92
|
|
|
|
|
Soumya92 wrote: now I cannot send any POST commands
What do you mean "cannot"?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Everytime I POST data to the server, a webexception is thrown: The underlying connection was closed.
~ Soumya92
|
|
|
|
|
Soumya92 wrote: a webexception is thrown
WHAT exception?
Is the server configured to not accept POST?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
"The underlying connection was closed"
The site works fine in a browser, once you get past the security error, so I assume that the server does accept post.
Is it somehow possible to ignore the certificate errors for the webbrowser control?
~ Soumya92
|
|
|
|
|
hi.please note to my code and help me.source image format is jpeg.
below is my code.thanks.
private void Saveimg(Image image)
{
MemoryStream stream = new MemoryStream();
image.Save(stream,System.Drawing.Imaging.ImageFormat.Jpeg);
byte[]imgdata= new byte[stream.Length];
imgdata= stream.ToArray();
string Filename = "c:\\" + Convert.ToString(DateTime.Now.ToFileTime()) +".jpg";
FileStream fs = new FileStream(Filename, FileMode.CreateNew, FileAccess.Write);
fs.Write(imgdata, 0, imgdata.Length);
fs.Close();
}
|
|
|
|
|
This might be ExternalException ,which means that you are trying to save the image using invalid format.Try to replace in your code System.Drawing.Imaging.ImageFormat.Jpeg
with image.RowFormat .Notice that .jpg or .jpeg extensions could not guarantee that the format is Jpeg.
Life is a stage and we are all actors!
modified on Tuesday, August 18, 2009 5:11 AM
|
|
|
|
|
hi.tanks for answering.
but this again throw exeption.please help me.
|
|
|
|
|
The which kind of exception and where exactly it occurred?
Make sure that Image.RowFormat is not equal to Emf, Exif, Icon, MemoryBmp Wmf,which might be not supported by the Image.Save(Stream,ImageFormat) method used into your code.
Life is a stage and we are all actors!
modified on Tuesday, August 18, 2009 7:56 AM
|
|
|
|