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

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top