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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting into a textbox when clicking a button

Status
Not open for further replies.

oddball

Technical User
Mar 17, 2000
64
GB
Have put some code in that allows a site administrator to upload an image. I would like to modify the button click subroutine so that it will insert the <img src=&quot;....&quot; /> code for the uploaded image at the point where the cursor is in a text box:

===========================================================
Sub Upload_Click(ByVal sender As Object, ByVal e As EventArgs)

Dim strFileName As String

' Proceed only if a file has been specified
strFileName = System.IO.Path.GetFileName(UploadedFile.PostedFile.FileName)
UploadedFile.PostedFile.SaveAs(Server.MapPath(&quot;/Portal/images/&quot;) + strFileName)

End Sub
===========================================================

How's it done????

cheers,

si
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top