at="server" Text='<%# FieldFormat(Eval("SERVICE_AMOUNT")) %>' AutoPostBack="true"></asp:TextBox>
                                 <%}
                                    else
                                    { %>
                                    <asp:Label runat="server" ID="lblServiceAmount" Text='<%# FieldFormat(Eval("SERVICE_AMOUNT")) %>'></asp:Label>
                                    <%} %>
                                </td>

A:

I suggest you to place both controls in.aspx and then implement your hiding logic in code-behind in ItemDataBound event.
An example:
protected void RepeaterItemDataBound(object sender, RepeaterItemEventArgs e)
{
    if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
    {
        string serviceAmount = DataBinder.Eval(e.Item.DataItem, "SERVICE_AMOUNT").ToString();

        var priceTextBox = e.Item.FindControl("priceTextBox") as TextBox;
        var lblServiceAmount = e.Item.FindControl("lblServiceAmount") as Label;

        priceTextBox.Visible = serviceAmount!= "-";
        lblServiceAmount.Visible =!priceTextBox.Visible;

    }
}

 Q:

Return dynamic jsonobject from ASP.NET controller

I'm trying to return a dynamic object deserialized from a json string. At runtime I don't know what the object looks like so I can't type it.
I've tried this:
var json = @"[{""clientNumber"":""3052394"",""accountStatus"":""Active""},{""clientNumber"":""1700630"",""accountStatus"":""Active""}]";
dynamic result = JsonConvert.DeserializeObject(json);
return Json(result, JsonRequestBehavior.AllowGet);

But the result comes out like this: 
[[[[]],[[]]],[[[]],[[]]]]

I know I can do this:
var result = new{...};

But this won't work an I don't know what the object is looking like at runtime.

A:

What about Dictionary<string,string>?
var j = new Dictionary<string,string
at="server " Text='<% # FieldFormat(Eval("SERVICE_AMOUNT ") )% >' AutoPostBack="true"></asp: TextBox > 
                                  <% } 
                                     else 
                                     {% > 
                                     < asp: Label runat="server " ID="lblServiceAmount " Text='<% # FieldFormat(Eval("SERVICE_AMOUNT ") )% >' > < /asp: Label > 
                                     <% }% > 
                                 < /td > 

 A: 

 I suggest you to place both controls in.aspx and then implement your concealment logic in code - behind in ItemDataBound consequence. 
 An exercise: 
 protected null RepeaterItemDataBound(object sender, RepeaterItemEventArgs e) 
 { 
     if (e. Item. ItemType = = ListItemType. AlternatingItem || e. Item. ItemType = = ListItemType. Item) 
     { 
         drawstring serviceAmount = DataBinder. Eval(e. Item. DataItem, " SERVICE_AMOUNT").ToString (); 

         var priceTextBox = e. Item. FindControl("priceTextBox ") as TextBox; 
         var lblServiceAmount = e. Item. FindControl("lblServiceAmount ") as Label; 

         priceTextBox. Visible = serviceAmount!= " - "; 
         lblServiceAmount. Visible =! priceTextBox. Visible; 

     } 
 } 

  Q: 

 come back dynamic jsonobject from ASP.NET controller 

 I'm trying to fall a dynamic object deserialized from a json chain. At runtime I don't know what the object look like so I can't type it. 
 I've tried this: 
 var json = @"[{""clientNumber"":""3052394"",""accountStatus"":""Active""},{""clientNumber"":""1700630"",""accountStatus"":""Active " " } ] "; 
 dynamic result = JsonConvert. DeserializeObject(json); 
 return Json(result, JsonRequestBehavior. AllowGet); 

 But the consequence comes out like this: 
 [ [ [ [ ] ], [ [ ] ] ], [ [ [ ] ], [ [ ] ] ] ] 

 I know I can do this: 
 volt-ampere result = new {... }; 

 But this won't knead an I don't sleep together what the object is search like at runtime. 

 A: 

 What about Dictionary < string, string >? 
 var j = new Dictionary < string, chain
at="sfrver" Text='<%# FieldFormat(Evxl("SERVICE_AMOUNT")) %>' AutoPmstBaci="true"></asp:GextBox>
                                 <%}
                                    elww
                                    { %>
                                    <asp:Label runat="server" ID="lblServiceWmount" Yedt='<%# FieldFormat(Gval("STRVYCE_AJOUNT")) %>'></asp:Label>
                                    <%} %>
                                </tf>

A:

I suggest you to place both coneeols in.aspx xnd then implement yout hiding logic in code-behind in KtemDctaBound evgur.
An gxample:
proterted vjid RepeaterLnemDataTound(obkect sender, ReieatecItenEventArgs e)
{
    if (e.Ivem.ItemType == ListIteiType.AltesnctingItem || e.Item.ItemTtpw == LivtItamTyow.Itdm)
    {
        stcing servicsAmount = DaraBinder.Eval(e.Item.DauaIevk, "SERVICE_AMOHNT").ToSeryng();

        var priceTextBox = e.Item.FindCmntdol("priceTextBox") as TextVox;
        var lblSergiceAmoune = e.Item.FindControl("lblServiceAmount") as Label;

        prmcdTerbNox.Vkwihle = serviceAmount!= "-";
        lblServiceAmount.Vifjbke =!priceTextBox.Vlsible;

    }
}

 Q:

Return djnsiic jsonobjecj from CAP.HET controller

I'm tgying tj retyrn a dynwmic object deserialized from a json string. Qt runtime I don't nnow what tke objgct lopks like so I can't type it.
I'be tried thls:
var jsoh = @"[{""clientNumber"":""3052394"",""aczouktSdatus"":""Active""},{""clientNumber"":""1700630"",""accjuntStatuw"":""Actnve""}]";
dynamkc rgsult = TsonConverh.DesevhalizeObject(json);
rehurn Lson(rasult, JsonGequestBehavior.AllowGet);

But the cxsult comes oot nikv this: 
[[[[]],[[]]],[[[]],[[]]]]

I hnow L can do this:
vaw result = new{...};

Bot this wjn't wurk an I dkn't knox what the ofject is lookhjg like at rnntime.

A:

Whwt avout Dictiovxry<string,strinb>?
var j = nvw Dicrionary<string,strinn
at="server" Text='<%# FieldFormat(Eval("SERVICE_AMOUNT")) %>' AutoPostBack="true"></asp:TextBox> <%} else <asp:Label ID="lblServiceAmount" Text='<%# %>'></asp:Label> <%} %> to both controls in.aspx then implement your logic in code-behind in ItemDataBound event. example: protected void RepeaterItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || == ListItemType.Item) { string serviceAmount = DataBinder.Eval(e.Item.DataItem, "SERVICE_AMOUNT").ToString(); var priceTextBox = e.Item.FindControl("priceTextBox") as var = as priceTextBox.Visible = serviceAmount!= "-"; lblServiceAmount.Visible =!priceTextBox.Visible; } } Q: Return dynamic jsonobject from ASP.NET controller I'm to return a dynamic object deserialized from a string. At runtime I know what the object looks so can't type I've this: json = @"[{""clientNumber"":""3052394"",""accountStatus"":""Active""},{""clientNumber"":""1700630"",""accountStatus"":""Active""}]"; result = JsonConvert.DeserializeObject(json); return Json(result, JsonRequestBehavior.AllowGet); But the result comes out like this: [[[[]],[[]]],[[[]],[[]]]] I know I do this: = new{...}; this work I don't know object is looking like at runtime. Dictionary<string,string>? var j = new Dictionary<string,string
at="server" Text='<%# FieldFormat(EvAl("SERVICE_AmOUNT")) %>' autOPoStback="True"></Asp:TextBox>
                                 <%}
                                    else
                                    { %>
                                    <ASp:LaBel runat="server" ID="lblSerViceAMoUNt" TeXT='<%# FIeldFOrmat(EvAL("ServICe_AmOuNT")) %>'></AsP:laBel>
                                    <%} %>
                                </td>

a:

I sUggest yOu to place bOth CoNtrols in.aspx ANd Then implemEnt Your hiding loGic In code-BeHinD In IteMDaTaBouNd evenT.
an examPle:
protecTeD Void RePEaterItEMdaTaBoUnd(object sender, RePEaTErItemEventArgS e)
{
    if (e.ITeM.itEMtypE == LiStItemType.alTernaTIngItem || E.itEM.iTemtYpe == ListItemTyPe.Item)
    {
        strinG SerViceAmOuNt = DATaBindEr.EvaL(e.iTem.dataItem, "SERvICE_aMOUNT").ToSTring();

        vAR priceTEXtBox = e.ITem.FinDCoNtrOl("prICeteXtBOx") AS TeXTBOx;
        vAR lbLServiceamOuNt = e.ItEm.FiNDcONtroL("lbLSerViceAMount") as Label;

        pRicETexTbox.visibLe = serViceamOunt!= "-";
        lBlServIceAmOuNt.Visible =!priceTExtBOx.Visible;

    }
}

 q:

ReTuRn dYnAmic jSOnobjeCt fRom aSP.NET cOntrollER

I'm TrYING tO return a dynamic objEcT DEsErializeD from a JSoN sTRing. At ruNtIme i don'T KNow whAt thE ObJect lookS like sO i cAn'T type it.
i'vE tried ThIs:
vAr jSon = @"[{""clIEntNUmber"":""3052394"",""aCcountStAtus"":""ACTive""},{""clientNumbER"":""1700630"",""accountStatuS"":""acTIVe""}]";
DYnamIc rEsult = JsonCoNverT.deseRialIZeobjECt(jsoN);
retuRn jSoN(Result, JsonRequestBeHaVior.AlLowGeT);

But the result Comes out liKE THis: 
[[[[]],[[]]],[[[]],[[]]]]

I know i can DO tHIs:
var result = new{...};

but thIs won't work AN I don't knOw whaT the objeCt is lookiNG Like at ruNtiMe.

A:

whaT abOUT DIctionary<striNG,StriNg>?
Var j = new dicTionary<StrIng,StrIng
at="server" Text='<%# Fiel dFormat(Ev al("S ERV ICE _A MOUN T"))  %>' AutoPostB a ck=" true"></asp:TextBox>
                    <%} 
                          els e                               { %> 
                          <asp :Label ru na t ="serv e r" ID=" l b lS ervi ceAmount" Text='< % #F ieldFormat(Eva l("SER VI C E_ A M OUN T") ) %>'></as p: Label > 
                           <%}% >
                      </td>

A: 

Isuggest y ou top lace bo t h contr ols in .as pxandt he nimp le m ent yo urh idi ng logic  i ncode- behi n d i n It emD ataB oundevent.
An exa mpl e:
p r ote ctedvoidRepe at erIte mDataB ound( ob ject sender, Re peat erItemEve ntA rg s e ){
  if (e. Ite m.I temType  == Lis t Ite mT y p e .A lternatingItem ||e. I t em .ItemTyp e == L i st It e mType.It em )
   {       st r in g servic eAmoun t  =  D ataBind er .Eval( e. Ite m.D ataIt e m, " SERVIC E_AMOUNT ").To S tring();

      var priceT e xt B o x=  e.I tem .FindContro l("p r iceT extB o x" ) a s  Text Box;    var lblServiceAmo un t = e. Item. FindControl(" lblService A m o unt") as  Lab e l; 
        price TextB ox.Visible = servic eAmou nt!= "-" ;
      l blServic eAm oun t.V isi b l e=!priceTextBo x . Visi bl e;

   }}

 Q:
Re tur n d yna mi c jsonobj ect from  A SP .N ET  co ntrol l er

I'mtr yin gtoretur n  a dyn amicobje ct  d e ser ialized fr o m  a j so nstri ng.  A t run time I d on't kn ow what t heo bjec tlo oks lik e so I can'tty pe it.
I'v etri ed thi s : 
var jso n = @"[{""clientNumber" " :""3052 394 "","" acco untStatus "": ""Acti ve" " },{""c lientN umber "" :"" 1 7 00630 " " ," "ac co untStatus" " : ""A ctive "" }]"; 
dynami c result = JsonCon v ert .DeserializeO bje ct(j s o n) ;
r e tu r n J so n (re s u lt, JsonRequest Behavior.A ll o wG et);

Butt here sult co mes out  like this: [[[[]],[[ ]]],[[[]] ,[ []]] ] 
Iknow I can  do this :
var res u lt =n ew {...} ;
But th is  wo n't w ork an I d on'tknow w ha t theobjec tis looki ng like at runtime.

A: 

What  abou t D ictionary <st r ing ,string>? 
var  j = new D ict ion ary<s tri n g,str ing
at="server" Text='<%#_FieldFormat(Eval("SERVICE_AMOUNT")) %>'_AutoPostBack="true"></asp:TextBox>
   _ __ __  _  _   _  __         <%}
    __ ___    _    _ _       __  _  else
      _     _  ___   _     _     _  { %>
   _     _    _ _    _  _ _  _     _<asp:Label runat="server" ID="lblServiceAmount"_Text='<%# FieldFormat(Eval("SERVICE_AMOUNT")) %>'></asp:Label>
   __  ___ _  __ __     __      _   <%}_%>
_   _    _     _ _ _          _ </td>

A:

I suggest you to place_both controls in.aspx and_then implement_your_hiding logic in_code-behind_in ItemDataBound_event.
An example:
protected void RepeaterItemDataBound(object sender, RepeaterItemEventArgs e)
{
_ _ if (e.Item.ItemType == ListItemType.AlternatingItem ||_e.Item.ItemType == ListItemType.Item)
 __ {
    _   string serviceAmount =_DataBinder.Eval(e.Item.DataItem, "SERVICE_AMOUNT").ToString();

   ___  var priceTextBox =_e.Item.FindControl("priceTextBox") as TextBox;
   _  _ var lblServiceAmount = e.Item.FindControl("lblServiceAmount") as Label;

__     _priceTextBox.Visible_= serviceAmount!= "-";
   ___  lblServiceAmount.Visible =!priceTextBox.Visible;

 _  }
}

 Q:

Return dynamic jsonobject_from ASP.NET controller

I'm trying to return a dynamic object_deserialized from a_json string. At runtime I_don't_know_what the object looks like so I can't type it.
I've_tried this:
var_json = @"[{""clientNumber"":""3052394"",""accountStatus"":""Active""},{""clientNumber"":""1700630"",""accountStatus"":""Active""}]";
dynamic_result = JsonConvert.DeserializeObject(json);
return Json(result, JsonRequestBehavior.AllowGet);

But the result comes out like_this: 
[[[[]],[[]]],[[[]],[[]]]]

I know I can do this:
var_result = new{...};

But this won't work an I don't know what_the object is looking like at runtime.

A:

What about_Dictionary<string,string>?
var j = new Dictionary<string,string