Click here to Skip to main content
15,904,348 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Validation Problem Pin
Shaurya_Rastogi6-Sep-07 2:07
Shaurya_Rastogi6-Sep-07 2:07 
GeneralRe: Validation Problem Pin
Sandeep Akhare6-Sep-07 2:09
Sandeep Akhare6-Sep-07 2:09 
QuestionValidation-------urgent Pin
Priya_20075-Sep-07 23:47
Priya_20075-Sep-07 23:47 
AnswerRe: Validation-------urgent Pin
Sandeep Akhare5-Sep-07 23:50
Sandeep Akhare5-Sep-07 23:50 
AnswerRe: Validation-------urgent Pin
Shujaat Ullah Khan6-Sep-07 0:09
Shujaat Ullah Khan6-Sep-07 0:09 
GeneralRe: Validation-------urgent Pin
Priya_20076-Sep-07 1:41
Priya_20076-Sep-07 1:41 
GeneralRe: Validation-------urgent Pin
Shujaat Ullah Khan6-Sep-07 1:51
Shujaat Ullah Khan6-Sep-07 1:51 
QuestionAccessing an ImageField in a GridView programmatically Pin
Rohde5-Sep-07 23:37
Rohde5-Sep-07 23:37 
As the subject reveals, I'm trying to access an ImageField programmatically in order to set the image according to the business object.

In the RowDataBound event handler, I have:

<br />
protected void MessagesGridView_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{      <br />
   if (e.Row.RowType == DataControlRowType.DataRow)<br />
   {<br />
      ImageField theImage = (ImageField)e.Row.Cells[0].Controls[0];<br />


But I get a "[...] Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ImageField' [...]"

I've searched like mad, but I can't see what I'm doing wrong.










"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."

-Atlas Shrugged, Ayn Rand

AnswerRe: Accessing an ImageField in a GridView programmatically Pin
Parwej Ahamad5-Sep-07 23:59
professionalParwej Ahamad5-Sep-07 23:59 
GeneralRe: Accessing an ImageField in a GridView programmatically Pin
Rohde6-Sep-07 0:15
Rohde6-Sep-07 0:15 
Questioncustom event handler problem Pin
ekynox5-Sep-07 23:25
ekynox5-Sep-07 23:25 
AnswerRe: custom event handler problem Pin
ekynox6-Sep-07 11:03
ekynox6-Sep-07 11:03 
QuestionDetailsView loses controls state and binding after an exception occurs Pin
Alex Getman5-Sep-07 22:49
Alex Getman5-Sep-07 22:49 
QuestionTracing Pin
Priya S5-Sep-07 22:20
Priya S5-Sep-07 22:20 
AnswerRe: Tracing Pin
Parwej Ahamad5-Sep-07 22:39
professionalParwej Ahamad5-Sep-07 22:39 
GeneralRe: Tracing Pin
Priya S6-Sep-07 1:18
Priya S6-Sep-07 1:18 
AnswerRe: Tracing Pin
Sandeep Akhare5-Sep-07 23:48
Sandeep Akhare5-Sep-07 23:48 
GeneralRe: Tracing Pin
Priya S6-Sep-07 1:17
Priya S6-Sep-07 1:17 
GeneralRe: Tracing Pin
Sandeep Akhare6-Sep-07 1:50
Sandeep Akhare6-Sep-07 1:50 
AnswerRe: Tracing Pin
Shujaat Ullah Khan6-Sep-07 0:12
Shujaat Ullah Khan6-Sep-07 0:12 
GeneralRe: Tracing Pin
Priya S6-Sep-07 1:16
Priya S6-Sep-07 1:16 
GeneralRe: Tracing Pin
Shujaat Ullah Khan6-Sep-07 1:44
Shujaat Ullah Khan6-Sep-07 1:44 
QuestionASP 2.0 Deployment Pin
pksno15-Sep-07 22:04
pksno15-Sep-07 22:04 
QuestionHow can I access a textbox in an insertItemTemplate in a formview control. Pin
Big Ralph5-Sep-07 21:35
Big Ralph5-Sep-07 21:35 
AnswerRe: How can I access a textbox in an insertItemTemplate in a formview control. Pin
Ahmad Adnan5-Sep-07 23:14
Ahmad Adnan5-Sep-07 23:14 

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.