asp.net - How to pass multiple parameters to Eval()? -


I have a bit of asp x code that uses the first to generate calls for a javascript function:

ASP.NET (wrapped for readability):

  & asp: LinkButton runat = "server" OnClientClick = '& lt;% # Eval ( "NodeGUID", "Return DoStuff (this, \" {0} \ ");")%> 'Text = "do stuff" />  

This creates JavaScript similarly:

Javascript (wrapped for readability):

  Return data (this is, "3F2504E0-4F89-11D3- 9AC -0305A 82C3301");  

Note: I generated the quotation for readability & amp; Quot; The context of the institutions has changed.

Javascript (wrapped for readability)

Now let me call in Javascript function call To add a 3D parameter, return to the former> (this, "3F2504E0-4F89-11D3- 9AC-3005E 82C3301", "Allison Angel. JPG");

Note: I generated the quotation for readability & amp; Quot; The context of the institutions has changed.

C # (omitted code for readability)

:

  protected string GetItemText (MySomething item) {...}  

I know that the above mentioned work can be called aspx from ASP.NET (wrapped, readability Codes for excluded):

  & lt; Asp: LinkButton .. runat = "server" text = "& lt;% # getItemText ((MySomething) container.datetime)% & gt;" ... />  

So now I want to use this function to include 3 parameters in the javascript function. Start from:

  and ASP: LinkButton Runat = "server" OnClientClick = '& lt;% # Eval ("NodeGUID", "Return DoStuff (this, "" {0} \ ", \" Today - insert captions here \ ");"%> gtk; text = "do stuff" />  

change me Required: " Todo - Insert caption here "

To call: & lt;% # GetItemText ((MySomething) container.datetime)% &

Clearly trying:

ASP.NET (wrapped for readability):

< Pre> & asp: LinkButton runat = "server" OnClientClick = '& lt;% # Eval ("no Idaida ", GetItemText ((MySomething) Kantenrkdetaitm)," Return DoStuff (this, \ "" {0} \ ", \" {1} \ ");")% & gt; Text = "do stuff" />

But this is complaining because Eval () takes only two parameters.


I tried a little offense:

ASP.NET (wrapped for readability)

  & amp; ATP: LinkButton Runat = "server" on-clientclic = '& lt;% # Eval ("node divinity", "return dustf (this, \" {0} \ ", \" "+ GetItemText ((MySomething) container. ) + "\"); ")%> 'Text = "do stuff" />  

But that does not work too.


Related Questions


Comments