Pass value from activex textbox to webform textbox

Joined
May 30, 2008
Messages
2
Reaction score
0
Hello
I have wrote code to get the default printer name using activex and when I run it in asp page it's showing me my machine default printer name in textbox as follow
Code:
Public Function MyPrinter()
Dim PrintData As Printer
Dim defprinterpos%
For Each PrintData In Printers
' Add printer name and port to list
lstPrinter.AddItem PrintData.DeviceName & " at: " & PrintData.Port
' Check for default printer
If PrintData.DeviceName = Printer.DeviceName Then defprinterpos = lstPrinter.NewIndex
Next
lstPrinter.ListIndex = defprinterpos%
DefaultPrinter .Text = Printer.DeviceName

End Function


I need to make the value of DefaultPrinter.text to be seted to my textbox1.text in my webform just when you load the application , and is it possible to save it to session

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top