Re: format nested repeater

From: Martin Dechev (detcheff__at_hotmail.com)
Date: 09/21/04


Date: Tue, 21 Sep 2004 15:13:50 +0200

Hi,

So what is the type of

DataBinder.Eval(e.Item.DataItem, "SubProcess")?

What happens if you try:

MainHeading = DataBinder.Eval( e.Item.DataItem, "SubProcess").ToString();

I'm sorry but I'm just guessing as I don't have the code to reproduce the
behavior you're experiencing.

Greetings
Martin
"Dan Poincelot" <dpoincelot@masonmadison.com> wrote in message
news:#gaa4V9nEHA.3868@TK2MSFTNGP11.phx.gbl...
> Hi Martin, thanks for the response, I now can get the itemdatabound for
> the child repeater to fire. However, it can't seem to locate column
> names in the child repeater, the code is below (I put the error mesage
> below the code):
>
> protected void CategoryRepeater_ItemDataBound(object sender,
> System.Web.UI.WebControls.RepeaterItemEventArgs e)
> {
> Response.Write("it fired!");
>
> //subprocess, need to only show it once for each list
>
> LabelSubProcess = (Label)e.Item.FindControl("LabelSubProcess");
>
> MainHeading = (string)DataBinder.Eval( e.Item.DataItem, "SubProcess" );
>
> if (MainHeading == PastHeading)
> {
> LabelSubProcess.Text = "";
> }
> else
> {
> LabelSubProcess.Text = (string)DataBinder.Eval( e.Item.DataItem,
> "SubProcess" );
> }
>
> PastHeading = MainHeading;
>
> //End subprocess code
>
> }
>
> Here is the error message:
>
> Specified cast is not valid.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.InvalidCastException: Specified cast is not
> valid.
>
> Source Error:
> Line 259: MainHeading = (string)DataBinder.Eval( e.Item.DataItem,
> "SubProcess" );
>
> Thanks again for any more help you can offer.
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Get Connected Crashes Computer
    ... Susan, have you solved your problem, in that case, what did you do? ... "Peter B" wrote in message ... Unfortunately I cannot reproduce the problem on ... >>>that error message is very useful. ...
    (microsoft.public.pocketpc.activesync)
  • Re: Check for missing field in edit form
    ... I can't reproduce the behaviour you're experiencing. ... on the hyperlink control and follow the menu down to 'edit hyperlink' it ... keeps looping the error message and I cannot continue. ... 'The field is empty ...
    (microsoft.public.access.gettingstarted)
  • Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
    ... When I attempted to reproduce the problem before, ... This causes the 'must use dbSeeChanges' error, ... >>> I have tried opening a recordset with a SQL statement and I still get ... >>I've never met this error message but I never leave the options blank ...
    (microsoft.public.access.modulesdaovba)
  • Re: Order By - Conditional
    ... I must reproduce your situation on my system. ... Enough sample data to show what you want to achieve, ... are getting from it - if it's an error message, ... A short and concise description of the business problem you're trying ...
    (microsoft.public.sqlserver.mseq)
  • Re: Printing Area Too Small
    ... for using inputbox. ... I can't seem to reproduce it with a simpler version. ... is what could be generating the error message. ... SET ORDER TO WindowID ...
    (microsoft.public.fox.programmer.exchange)