Click here to Skip to main content
15,891,033 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionsignup page Pin
siddisagar14-Feb-07 1:36
siddisagar14-Feb-07 1:36 
AnswerRe: signup page Pin
Neeraj Arora14-Feb-07 2:22
Neeraj Arora14-Feb-07 2:22 
QuestionHow to Capture "ESC" key stroke in ASP.NET web application. Pin
xiao bin bin14-Feb-07 1:01
xiao bin bin14-Feb-07 1:01 
AnswerRe: How to Capture "ESC" key stroke in ASP.NET web application. Pin
badgrs14-Feb-07 1:05
badgrs14-Feb-07 1:05 
GeneralRe: How to Capture "ESC" key stroke in ASP.NET web application. Pin
xiao bin bin14-Feb-07 5:05
xiao bin bin14-Feb-07 5:05 
QuestionHow to save image(.jpg) file in database Pin
MissionSuccess14-Feb-07 0:55
MissionSuccess14-Feb-07 0:55 
AnswerRe: How to save image(.jpg) file in database Pin
Tech_spidy14-Feb-07 1:49
Tech_spidy14-Feb-07 1:49 
GeneralRe: How to save image(.jpg) file in database Pin
MissionSuccess14-Feb-07 2:01
MissionSuccess14-Feb-07 2:01 
ya i have little bit idea
i want to take the image by using Html fileinputbox control and from the specified path,i want to retrieve only the filename(not path).

and store that file(binary data) in one of my image field.

can u give me some code for doing this......

my code is..................


Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'Dim str As String = Me.File1.Value()
'If InStr(str, ".jp") > 0 Then
' 'File1.PostedFile.InputStream()
'Else
' Exit Sub
'End If

Dim myStream As Stream
myStream = File1.PostedFile.InputStream
Dim ImgLength As Int64 = File1.PostedFile.ContentLength
Dim ImgBinaryData(ImgLength) As Byte
Dim n As Int64 = myStream.Read(ImgBinaryData, 0, ImgLength)
saveimage(ImgBinaryData)
End Sub
Public Sub saveimage(ByVal mImageFileData As Byte())
Try
Dim myTable As DataTable
Dim myRow As DataRow
conn = New SqlConnection(constr)
conn.Open()
cmd = New SqlCommand("spr_insertImage", conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@ImageData", mImageFileData))
cmd.ExecuteNonQuery()
conn.Close()

Catch ex As Exception
lblError.Text = ex.Message
End Try
End Sub

but its not working......
any help
AnswerRe: How to save image(.jpg) file in database Pin
Neeraj Arora14-Feb-07 2:26
Neeraj Arora14-Feb-07 2:26 
GeneralRe: How to save image(.jpg) file in database Pin
MissionSuccess14-Feb-07 17:40
MissionSuccess14-Feb-07 17:40 
QuestionASP:TreeView Pin
Sam Heller13-Feb-07 23:32
Sam Heller13-Feb-07 23:32 
AnswerRe: ASP:TreeView Pin
badgrs13-Feb-07 23:44
badgrs13-Feb-07 23:44 
GeneralRe: ASP:TreeView Pin
badgrs14-Feb-07 0:09
badgrs14-Feb-07 0:09 
GeneralRe: ASP:TreeView Pin
Sam Heller14-Feb-07 0:19
Sam Heller14-Feb-07 0:19 
AnswerRe: ASP:TreeView Pin
badgrs14-Feb-07 1:04
badgrs14-Feb-07 1:04 
Questionhow to create auto complete text box in ASP Pin
Tech_spidy13-Feb-07 23:24
Tech_spidy13-Feb-07 23:24 
AnswerRe: how to create auto complete text box in ASP Pin
Sam Heller13-Feb-07 23:27
Sam Heller13-Feb-07 23:27 
GeneralRe: how to create auto complete text box in ASP Pin
Tech_spidy14-Feb-07 0:10
Tech_spidy14-Feb-07 0:10 
GeneralRe: how to create auto complete text box in ASP Pin
Sam Heller14-Feb-07 0:13
Sam Heller14-Feb-07 0:13 
GeneralRe: how to create auto complete text box in ASP Pin
Tech_spidy14-Feb-07 1:46
Tech_spidy14-Feb-07 1:46 
AnswerRe: how to create auto complete text box in ASP Pin
badgrs13-Feb-07 23:32
badgrs13-Feb-07 23:32 
Questionhow to get the status of the Windows service in aspx page Pin
ramyasangeet13-Feb-07 23:07
ramyasangeet13-Feb-07 23:07 
AnswerRe: how to get the status of the Windows service in aspx page Pin
Jesse Squire14-Feb-07 3:17
Jesse Squire14-Feb-07 3:17 
Questiontable control Pin
Mohammed Elkholy13-Feb-07 22:18
Mohammed Elkholy13-Feb-07 22:18 
AnswerRe: table control Pin
Sylvester george13-Feb-07 23:12
Sylvester george13-Feb-07 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.