asp.net - how to hide links in a aspx repeater and get dataitem -


I'm trimming the dealer to enter the repeater to hide the button based on the status column, but that data Iteem.dealstatus comparison is having trouble obtaining

Check here for what I code

  protected mine myrepeater_ItemCreated (Object Sender, RepeaterItemEventArgs e) {if (e Item.DataItem.DealStatus = is in = "Pending Sale") {e.item.FindControl ("LinksDownloads"). Visible = false; } If (E.Eight.Detitam.Delstats == "quote") (EITMFundControl ("link downloads)" visible = false; E.Item.FindControl ("LinkPurchase") .Visible = false ;}}   

Enter image details here < P> And here is my repeater code

  & lt; ASP: repeater id = "SearchRepeater" runat = "server" OnItemCreated = "myrepeater_ItemCreated"> gt; ItemTemplate & gt; LT; tr & gt; td class = "sorting_1" & gt; ASP: linkbutton runat = "server" command agreement = '& lt;% # Eval ("DealId")% & gt;' onclic = ' OnClCl "" "& gt; & lt;% # Eval (" Full Name ")%>    gt; & lt;% # Eval ("model")% & gt; & lt; / td & Gt; & lt; td class = "" & gt; & lt;% # Eval ("Win")%>  & lt; td class = "" & gt; & lt; % # Eval ("Dt")%> gt; & lt; / td & gt; & lt; td class = "" & gt; & Lt;% # Eval ("DelSTatus")% & gt; & Lt; / Td> & Lt; Td square = "" & gt; & Lt; Asp: LinkButton id = "PlanButton" CommandErment = '& lt;% # Eval ("DealID")% & gt; Class = "btn btn-default btn-xs btn-block scheme" runat = "server" onclick = "linkPlan_OnClickkPlan_OnClick" & gt; Plan & lt; / ASP: LinkButton & gt; & Lt; ASP: LinkButton ID = "LinkPurchase" class = "btn btn-default btn-xs btn-block purchase" runat = "server" & gt; Purchase & lt; / ASP: LinkButton & gt; & Lt; / TD & gt; & Lt; Td square = "" & gt; & Lt; ASP: LinkButton ID = "LinkDownloads" class = "btn btn-default btn-xs btn-block download" runat = "server" & gt; Download & lt; / ASP: LinkButton & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: Repeater & gt;   

Here is the answer

  object DI = E. ITEM Datatoms; String position = databender.value (DI, "DelStatus"). Toasting ();    

Use a lable instead. Inside the Repeater

  & lt; ASP: Labels ID = "DealStatus_Lbl" runat = "Server" text = '& lt;% # Eval ("DealStatus")% & gt; / & Gt;   

Code being

  labeled lblA = (label) e.Item.FindControl ("DealStatus_Lbl"); If (lbla.Text ==) {}    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -