Click here to Skip to main content
15,895,192 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: javascipt document.getElementByID() problem using MasterPage Pin
sivaprakas17-Feb-08 19:37
sivaprakas17-Feb-08 19:37 
GeneralRe: javascipt document.getElementByID() problem using MasterPage Pin
N a v a n e e t h17-Feb-08 20:18
N a v a n e e t h17-Feb-08 20:18 
GeneralVs2005 & vs2003 Pin
Member 387988117-Feb-08 17:37
Member 387988117-Feb-08 17:37 
GeneralRe: Vs2005 & vs2003 Pin
Christian Graus17-Feb-08 18:23
protectorChristian Graus17-Feb-08 18:23 
QuestionObject reference not set and session issue... Pin
Kasic Slobodan17-Feb-08 11:43
Kasic Slobodan17-Feb-08 11:43 
GeneralRe: Object reference not set and session issue... Pin
Christian Graus17-Feb-08 16:42
protectorChristian Graus17-Feb-08 16:42 
GeneralRe: Object reference not set and session issue... Pin
Kasic Slobodan18-Feb-08 9:15
Kasic Slobodan18-Feb-08 9:15 
GeneralASP.NET Image Control at runtime Pin
plural17-Feb-08 10:10
plural17-Feb-08 10:10 
I want to load an image into an image control on page postback

the images in the folder are loaded in a listbox then when the user clicks onteh image it loads inthe listbox, but the image nerver loads..

Plz help

This is my code

Partial Class Photos
Inherits System.Web.UI.Page
Dim imageString As String


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not Page.IsPostBack Then
Dim ImageFolder As String = Server.MapPath("~\Images\Photos\")
Dim dir As New IO.DirectoryInfo(ImageFolder)
Dim fifo As IO.FileInfo
For Each fifo In dir.GetFiles
ListBox1.Items.Add(fifo.Name.ToString)
Next
End If

If Page.IsPostBack Then
Image2.ImageUrl = Server.MapPath("~\Images\Photos\" + imageString)

End If

End Sub


Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

imageString = ListBox1.SelectedItem.Value.ToString
aspxlab.Text = imageString



End Sub
End Class


phatkin

GeneralRe: ASP.NET Image Control at runtime Pin
Christian Graus17-Feb-08 10:46
protectorChristian Graus17-Feb-08 10:46 
GeneralRe: ASP.NET Image Control at runtime Pin
plural17-Feb-08 23:42
plural17-Feb-08 23:42 
Generalconfusing error, please help Pin
mehran.asg16-Feb-08 19:29
mehran.asg16-Feb-08 19:29 
GeneralRe: confusing error, please help Pin
Christian Graus16-Feb-08 21:44
protectorChristian Graus16-Feb-08 21:44 
GeneralRe: confusing error, please help Pin
mehran.asg16-Feb-08 22:05
mehran.asg16-Feb-08 22:05 
GeneralRe: confusing error, please help Pin
Christian Graus16-Feb-08 23:26
protectorChristian Graus16-Feb-08 23:26 
GeneralRe: confusing error, please help Pin
Guffa17-Feb-08 2:36
Guffa17-Feb-08 2:36 
GeneralProblem inserting image into table! Pin
Branislav Vidovic16-Feb-08 12:32
Branislav Vidovic16-Feb-08 12:32 
GeneralRe: Problem inserting image into table! Pin
Christian Graus16-Feb-08 12:38
protectorChristian Graus16-Feb-08 12:38 
GeneralRe: Problem inserting image into table! Pin
Branislav Vidovic20-Feb-08 11:56
Branislav Vidovic20-Feb-08 11:56 
GeneralRe: Problem inserting image into table! Pin
Not Active16-Feb-08 15:03
mentorNot Active16-Feb-08 15:03 
GeneralRe: Problem inserting image into table! Pin
Mitesh Darji17-Feb-08 19:22
Mitesh Darji17-Feb-08 19:22 
GeneralMysql connection + asp.net at my site www.sharetosavev.co.uk Pin
Naveed Kamboh16-Feb-08 11:38
Naveed Kamboh16-Feb-08 11:38 
GeneralRe: Mysql connection + asp.net at my site www.sharetosavev.co.uk Pin
Christian Graus16-Feb-08 12:39
protectorChristian Graus16-Feb-08 12:39 
QuestionKeyword feature ? Pin
scm22ri16-Feb-08 11:06
scm22ri16-Feb-08 11:06 
AnswerRe: Keyword feature ? Pin
Christian Graus16-Feb-08 11:35
protectorChristian Graus16-Feb-08 11:35 
AnswerRe: Keyword feature ? Pin
dilipv17-Feb-08 19:48
dilipv17-Feb-08 19:48 

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.