Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Common Dialog Control in asp page?

Status
Not open for further replies.

elmakiraz

Programmer
Jan 5, 2004
2
0
0
TR
Hello,
I am not an experienced programmer and I want to use MS Common Dialog Control in my asp page. Here is the code I use:

<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>

Sub btnBrowse_onclick()
CommonDialog1.ShowOpen()
End Sub
</SCRIPT>
<BODY>

<OBJECT CLASSID=&quot;clsid:5220cb21-c88d-11cf-b347-00aa00a28331&quot;>
<PARAM NAME=&quot;LPKPath&quot; VALUE=&quot;CommonDialogControl.lpk&quot;>
</OBJECT>

<OBJECT ID=&quot;CommonDialog1&quot; WIDTH=32 HEIGHT=32
CLASSID=&quot;CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB&quot;
CODEBASE=&quot;comdlg32.ocx&quot;>
</OBJECT>

</BODY>
</HTML>

But when I press the 'browse' button it does not open the common dialog control and I have this error:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'CommonDialog1'
/WebDeneme/WebDeneme.asp, line 35


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
POST 230 bytes to /WebDeneme/WebDeneme.asp

POST Data:
_method=%2FWebDeneme%2FWebDeneme.asp%3F_method%3D_EM__onclientevent%26pcount%3D2%26p0%3DbtnBrowse%26p1%3Donclick&_btnCopy_state=value%3DCopy&_btnBrowse_state=value%3DBrowse&_btnShowForm_state=value%3D . . .

Shall I choose something from the Project References? what is the problem? Thanks in advance.
 
I have not tried to use the Common Dialog control in an ASP page, but there may be ways to address it or alternatives. A quick search of the the ASP forum turned up these two posts that may be of some benefit to you:

thread333-678794
thread333-720740

If you want to redirect your question to that forum (it is forum333), then that may be an option to find either this answer or an alternative. Hope this helps.

-----------------------------------------------------------------------------------------------------
&quot;If you can't explain something to a six-year-old, you really don't understand it yourself.&quot;
-- Albert Einstein
 
Hi, thank you for your answer. I checked the links you posted. I will work on some ideas I had there. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top