Click here to Skip to main content
15,889,335 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Error - when uploading excel file to server Pin
VijayVishwakarma17-Nov-08 18:24
VijayVishwakarma17-Nov-08 18:24 
GeneralRe: Error - when uploading excel file to server Pin
Satish - Developer17-Nov-08 20:33
Satish - Developer17-Nov-08 20:33 
Questionwindows control on a web page Pin
Tabb Smith17-Nov-08 16:50
Tabb Smith17-Nov-08 16:50 
AnswerRe: windows control on a web page Pin
Christian Graus17-Nov-08 21:12
protectorChristian Graus17-Nov-08 21:12 
Questionrookie question about a simple code Pin
Yifei Jia17-Nov-08 16:03
Yifei Jia17-Nov-08 16:03 
AnswerRe: rookie question about a simple code Pin
Abhijit Jana17-Nov-08 17:45
professionalAbhijit Jana17-Nov-08 17:45 
AnswerRe: rookie question about a simple code Pin
Christian Graus17-Nov-08 21:13
protectorChristian Graus17-Nov-08 21:13 
QuestionNeed Help Pin
learningman17-Nov-08 12:46
learningman17-Nov-08 12:46 
admin page has a detailsview

hikingpage has a gridview

problem is when i enter the second image instead of a new row the image replace's the first image and the rest of the row appears farther down the gridview

here is the codebihind that i used
Imports System.Data
Partial Class Admin
Inherits System.Web.UI.Page

Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles DetailsView1.ItemInserted
'If the record was successfully inserted,save the picture
If e.AffectedRows > 0 Then

Dim results As DataView = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView)

Dim PictureIDJustAdded As Integer = CType(results(0)(0), Integer)

'Reference the FileUpload control
Dim imageUpload As FileUpload = CType(DetailsView1.FindControl("imageUpload"), FileUpload)

If imageUpload.HasFile Then
Dim basedirectory As String = Server.MapPath("~/UploadedImages/")


imageUpload.SaveAs(basedirectory & PictureIDJustAdded & ".jpg")
End If
End If

End Sub
End Class

this is the codebehind on the admin page
can anyone help me out here
AnswerRe: Need Help Pin
Christian Graus17-Nov-08 14:46
protectorChristian Graus17-Nov-08 14:46 
QuestionDataSet problem [modified] Pin
Phrone17-Nov-08 10:54
Phrone17-Nov-08 10:54 
AnswerRe: DataSet problem Pin
Christian Graus17-Nov-08 11:31
protectorChristian Graus17-Nov-08 11:31 
GeneralRe: DataSet problem Pin
Phrone17-Nov-08 11:46
Phrone17-Nov-08 11:46 
GeneralRe: DataSet problem Pin
Christian Graus17-Nov-08 14:47
protectorChristian Graus17-Nov-08 14:47 
Questionregister user control non declaratively Pin
hassanmohamed17-Nov-08 10:14
hassanmohamed17-Nov-08 10:14 
AnswerRe: register user control non declaratively Pin
Christian Graus17-Nov-08 11:33
protectorChristian Graus17-Nov-08 11:33 
Questionsave .csv with newline character Pin
ssircar197117-Nov-08 9:53
ssircar197117-Nov-08 9:53 
AnswerRe: save .csv with newline character Pin
NeverHeardOfMe17-Nov-08 11:08
NeverHeardOfMe17-Nov-08 11:08 
AnswerRe: save .csv with newline character Pin
Christian Graus17-Nov-08 11:34
protectorChristian Graus17-Nov-08 11:34 
QuestionAdding web reference problem because of autodetectcookiesupport Pin
AlexeiXX317-Nov-08 6:57
AlexeiXX317-Nov-08 6:57 
AnswerRe: Adding web reference problem because of autodetectcookiesupport Pin
mintxelas7-Jun-10 21:49
mintxelas7-Jun-10 21:49 
GeneralRe: Adding web reference problem because of autodetectcookiesupport Pin
AlexeiXX38-Jun-10 7:52
AlexeiXX38-Jun-10 7:52 
Questionembed own controls Pin
Tommispilot17-Nov-08 3:49
Tommispilot17-Nov-08 3:49 
AnswerRe: embed own controls Pin
eyeseetee17-Nov-08 5:09
eyeseetee17-Nov-08 5:09 
GeneralRe: embed own controls Pin
Tommispilot17-Nov-08 21:20
Tommispilot17-Nov-08 21:20 
Questionhow to replace the one column data with other column data Pin
lakshmichawala17-Nov-08 3:09
lakshmichawala17-Nov-08 3:09 

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.