adding items to dropdown control from COM

Results 1 to 3 of 3

Thread: adding items to dropdown control from COM

  1. #1
    rajit Guest

    Default adding items to dropdown control from COM

    I built this asp COM obj. This obj reads data from ini file. This data needs to be populated in a drop down control that is in a frame in my web page. HOW DO I CODE FOR THIS IN COM?<BR><BR>Thanks

  2. #2
    David Mann Guest

    Default RE: adding items to dropdown control from COM

    Hello, Rajit. <BR><BR>Here is one suggestion:<BR><BR>In your project, make a reference to the ASP server object library by going to Project/References... and check on the "Microsoft Active Server Pages Library" reference. Now you can use ASP input/output methods. Here&#039s how to start it up:<BR><BR>&#039VB Code goes here:<BR>&#039declare your variables, first.<BR><BR> Private ScriptingContext As ScriptingContext<BR> Private Request As Request<BR> Private Response As Response<BR> Private Server As Server<BR><BR>&#039Now, write in this sub that allows the COM object to grab the <BR>&#039scriptingcontext so that you may use ASP code directly.<BR><BR>Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)<BR><BR> Set ScriptingContext = PassedScriptingContext<BR> Set Request = ScriptingContext.Request<BR> Set Response = ScriptingContext.Response<BR> Set Server = ScriptingContext.Server<BR><BR>End Sub<BR><BR>Now you&#039re all set. Of course, you can add in all the ASP objects this way....<BR><BR>In order to output your results directly from COM, just use your shiny new Response Object JUST AS YOU WOULD USE IT IN ASP. =) <BR><BR>Response.Write(iniOption1)<BR>Response.Wri te(iniOption2)<BR><BR>...and so forth, and so on. I hope this helps!<BR><BR>Sincerely,<BR> --David<BR><BR>

  3. #3
    rajit Guest

    Default RE: adding items to dropdown control from COM

    thanks for your response. But doing so (response.write(inioptions1...) will actually write the value into the html page. I want the values to be added to the control as items.<BR><BR>suggestions please...<BR><BR>thanks<BR>rajit<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts