|
When the application is run first time on the user machine, which is on a remote location, the application asks to download the activeX controls. This will initiate the process of installing the cab file related to a particular control to the user machine. All the information related to the control is downloaded in the form of cab file, which is used later to access the control.
The OBJECT tag in HTML file identifies the ActiveX control. If the control has been stored in a .cab file, OBJECT must include a CODEBASE attribute that specifies the URL for this .cab file.
The following sample HTML file demonstrates how the OBJECT and CODEBASE attribute are used.
Example:
<OBJECT CLASSID="clsid:abcdef….."
CODEBASE="http://webserver/test.cab"
ALIGN="CENTER" WIDTH=270 HEIGHT=26 ID="T1"><PARAM NAME="Interval" VALUE=1000>
<PARAM NAME="Enabled" VALUE=1></OBJECT>
Microsoft Internet Explorer 4.0 or later versions handle the OBJECT and the CODEBASE attribute in the following manner for accessing controls stored in cabinet files.
• Parses the OBJECT and searches for the CODEBASE attribute.
• Locates the .cab file identified by the CODEBASE attribute.
• Expands the files found in the .cab file.
• Copies the expanded files to the user's computer (the default directory is \windows\occache).
• Registers the objects and/or files that require registration.
• Calls the Component Object Model (COM) CoCreateInstance function to create an instance of the specified object.
For eample
Following is a Textbox Object created using the <OBJECT> tags in the XYZ application. The Classid, which is the universal id, which specifies the physical location of the library, is used to refer the date Object in to the ASP pages. This date TextBox object is having a standard input format and all the attributes are set using the <PARAM> tag.
Example
<OBJECT VALIGN=CENTER Class=List classid="clsid:CC696B63-4159-11D0-BDCB-0020A90B183A" id=InspectDate NAME=txtInspectDate style="HEIGHT:22px; WIDTH:70px; LEFT: 0px; TOP: 0px" VIEWASTEXT>
<PARAM NAME="_Version" VALUE="393216">
.......
</OBJECT>
But please note, here the story does not end. Because in your case, we need to find out which Activex control is creating problem. But definitely above things can be good start point for you.
Amit
|
|
|
|
|
I have dynamically created a datagrid with multiple textbox template items, which allows the user to update these columns. I have tried to use the code .findcontrol on the template column to received the updated data so I can update the data base. I receive null value from the findcontrol. Since I am creating the datagrid dynamically is there something else I need to do?
Thanks,
Sheri Zdroik
|
|
|
|
|
As I understand it, since you are creating the datagrid dynamically the viewstate must be rendered before you can use the findcontrol method. Try moving the findcontrol to the page prerender and see if that resolves the problem.
|
|
|
|
|
The DataSource for ASP page has two columns CustomerID and CustomerName.
If I set DataValueField to CustomerID and DataTextField to CustomerName on my ASP application, I get a list like:
C101, JAMES BRETT
C102, JANE HUGH
C103, BRETT HART
where the text before the comma (,) represents the CustomerID while the part after the comma (,) represents the CustomerName.
How can I change the separator (,) in this case to something different, say space? The asp:DropDownList class does not appear to expose any property for changing this?
|
|
|
|
|
John Gathogo wrote: I get a list like:
Where do you get the list? What do you do to turn the data into a list?
---
b { font-weight: normal; }
|
|
|
|
|
The dropdownlist is on the webform and is bound to the DataSource that contains the customers data. The dropdown is populated with the data when the form loads
|
|
|
|
|
What do you do to create the comma separated list of values, then? Have you really specified the DataValueField and DataTextField properly?
---
b { font-weight: normal; }
|
|
|
|
|
I have an ObjectDataSource need a ControlParameter point to a textbox control in a FormView. When I use "myFormView.txtName" as ControlID I got error "Could not find control 'myFormView.txtName' in ControlParameter 'cpTest'". How can setup this ControlID?
<asp:ObjectDataSource ID="odsMane" Runat="server" TypeName="Test" SelectMethod="GeTestList">
<SelectParameters>
<asp:ControlParameter Name="cpTest" Type=string ControlID="???" DefaultValue="-1" />
<asp:Parameter Direction="Output" Name="pTest" Type="Int16" />
</SelectParameters>
</asp:ObjectDataSource>
|
|
|
|
|
You need to use the $ or : as the delimiter instead of the . , also make sure that the control does exist by the time the control parameter's value is populated.
|
|
|
|
|
Hello
This is my first time posting here. I get the codeproject newsletters and love them.
Anyway, the problem..
The app that I am responsible for is written in ASP.net, and it's running on 2 load balanced servers behind an alteon LB. *Most* of the time everything seems to work properly, but sometimes, code from the source of the page is displayed at the top of the page, and when this happens the .css is not applied to the page and the buttons do not work.
This only happens occasionally, at seemingly random pages in the app; And - if the user (tester in this case) refreshes the page it redraws fine, and they can proceed without issue.
Due to the sparadic nature of the problem I'm thinking it may be a timing issue or a configuration issue on the server(s).?
I've attempted to google this, but I'm not sure what search terms to use to return results, any insights or ideas would be greatly appreciated.
Has anyone here seen this happen with their app? Or fixed it?
Thanks in advance..
Todd.
|
|
|
|
|
It sounds like the project was built in debug mode and an error occurred.
|
|
|
|
|
I REALLY don't think it was built in debug mode, as a matter of fact there is information displayed prominently on the page when the app is in debug mode, and those are not displayed, so I can be reasonably certain that is not the specific cause.
I also ensured early on that the 'debug=false' in the 'compilation' key in the web.config.
It's an interesting suggestion though, so if you don't mind me asking, why do you think that is what it sounds like?
|
|
|
|
|
When an app is compiled in debug mode and an unhandled error occurs the error will be printed to the screen along with the code that it erred on. My guess was that a custom component was being used for the header and that erred. The message was sent to the screen and that is want you were seeing. To help resolve this could you tell me more about your environment?
What version of visual studio, language, are frames used?
The other guess I had was the original developer used response.write for debugging and that is what you are seeing.
|
|
|
|
|
Hi Jason
Thanks for the response.
The app is developed with VS.NET 2003. The language is VB. <-- is that what you mean? The page is displayed in en-CA and fr-CA, the problem occurs in both. No frames are used anywhere in the app.
The code displayed is not code from the code-behind page, and no errors are thrown. The code displayed is the actual source of the page, as though a quote or closing tag is missing from the html section of the source of the page when it is generated.
I'm thinking the component of .NET that generates the html output for IIS based on the execution of the code/codebehind .. Do you know what the name of the part of .NET is?, and if it has any configuration settings?
I know that the machine.config has a listing of browsers in it. I'm thinking theres a connection between those two things, but there are significant gaps in my understanding of how that whole thing works under the hood. So any clarification would be useful.
|
|
|
|
|
Now I am getting a better picture, first a clarification codebehind is the page.vb file which the page.aspx inherits from.
Question, is the application written with spaghetti code like an asp app, where the vb code is in the same file as the html?
|
|
|
|
|
No, there is no code in the page.
The app was architected nicely actually. It is pretty mature now being in production usage for a couple years. So there is some drift here and there from the original architecture, but for the most part it is well done. There is no spaghetti code - and no code in the pages.
|
|
|
|
|
And yeah, by codebehind, I mean the page.aspx.vb file.
|
|
|
|
|
Sorry Todd you have me stumped, if you discover the answer please let me know what it was – best of luck.
|
|
|
|
|
Hi
I have a nice website builded in Visual Studio 2005 in which i use SqlExpress as a database provider , and the whole thing works fine but i wan't to change the database Provider to SqlServer, so i made a connection with my SqlServer 2005 provider and used one of the sample tables of AdventureWorks that comes as a sample to compare the syntac of a select statements with the statements used in my code, and noticed a difference in the syntac:
//SqlServer
Select Statement:
SELECT AddressID, AddressLine1, AddressLine2, City, StateProvinceID, PostalCode, rowguid, ModifiedDate FROM Person.Address
//SqlExpress Select Statement
SELECT [transactionID], [creationDateTime], [advertiserID], [pathBanner], [endDateTime], [Skype], [redirectUrl], [POS] FROM [Banner]
As you can see the express version uses [ ] and the SqlServer version does not,and the question is if i have to change the select/insert and update statements in my code if i change the database provider in my webConfig file or that i can leave it the way it is.
With friendly greetings,
Eric Goedhart
"I love the sound of Servers in the Morning!"
|
|
|
|
|
You would need to use [] if you had spaces in your field names, e.g., [transaction ID]. But if you don't it doesn't matter. I guess SQL Express is just being more idiot-proof.
Kevin
|
|
|
|
|
Thanks Kevin
With friendly greetings,
Eric Goedhart
"I love the sound of Servers in the Morning!"
|
|
|
|
|
Express uses TSQL just like all versions of SQL Server 2005.
When was the last time you poured some wine for you and your sweetie and went out on the front porch to watch the geometry frolic on the lake?--Rebecca M. Riordan, Designing Effective Database Systems
|
|
|
|
|
Hi
I have a vb.net web user control. In the control I have created a gridview. I want to add a button to the control which will simply print the contents of the gridview when clicked.
Any ideas?
steve
|
|
|
|
|
Hello All,
I am using CDOSYS in my Email Marketing Web Application. Given below is the code that i use to send an email.. and it works, I am not able to detect if the file has bounced back. I am working on the Delivery Report and this is my first step towards it. I know there are lot of components out there that can manage all this for me. but i believe it is possible within the features offered by CDOSYS. The following link seems explaining it.
http://support.microsoft.com/?scid=kb;en-us;302839&spid=6384&sid=67
The code i used.
Function SendTestMails(ByVal strHTML As String, ByVal strToEmailID As String) As Boolean
Dim dtMember As DataTable
Dim strFromMailId, strSMTPserver, strSMTPusername, strSMTPpassword, strSMTPport As String
Try
dtMember = pi_obj_Member.GetMembers(2)
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try
If dtMember.Rows.Count > 0 Then
strFromMailId = "me@company.com"
strSMTPserver = "NNN.NN.NN.NN"
strSMTPusername = "MyUserName"
strSMTPpassword = "MyPassword"
strSMTPport = "25"
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
Dim objMessage As Object
objMessage = CreateObject("CDO.Message")
objMessage.Subject = "This is a test message"
objMessage.From = strFromMailId
objMessage.To = strToEmailID
objMessage.HTMLBody = CStr("" & strHTML)
'==This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPserver
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = strSMTPusername
'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = strSMTPpassword
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPport '25
'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
objMessage.Configuration.fields("urn:schemas:mailheader:disposition-notification-to") = "me@company.com"
objMessage.Configuration.fields("urn:schemas:mailheader:return-receipt-to") = "me@company.com"
objMessage.Configuration.Fields.Update()
'==End remote SMTP server configuration section==
Try
objMessage.Send()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try
objMessage = Nothing
End If
End Function
Alpha/Bravo\Charlie
|
|
|
|
|
I have a TableRow
TableRow tr = new TableRow();
I need to specify this row as a gradient from light gray to dark gray.
Does any know the code to do that? server-side code only please.
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|