Hello
Is it possilble to pass an object and a string to a function?
The object lives on the aspx page and the string live in a seperate function in the .cs page.
My ASPX page has an <%#(ParallelMat ing(Eval("Gende r"))%>
My CS page has
When I do this, I get the message CS1501: No overload for method 'ParallelMating ' takes '1' arguments
Line 170:<%#Parallel Mating(Eval("Ge nder"))%>
(pleae note, the Line170 is from the aspx page)
I can only assume the <%#ParallelMati ng(Eval)("Gende r"))%> needs to also pass a string to the code behind, but again, I have no idea how?
Thanks
Dave
Is it possilble to pass an object and a string to a function?
The object lives on the aspx page and the string live in a seperate function in the .cs page.
My ASPX page has an <%#(ParallelMat ing(Eval("Gende r"))%>
My CS page has
Code:
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["a"]=="123")
{
string s = "True";
ParallelMating(s);
}
public string ParallelMating(object o, string s)
{
string o = Convert.ToString(o);
if (o == s)
{
// do something
}
}
}
Line 170:<%#Parallel Mating(Eval("Ge nder"))%>
(pleae note, the Line170 is from the aspx page)
I can only assume the <%#ParallelMati ng(Eval)("Gende r"))%> needs to also pass a string to the code behind, but again, I have no idea how?
Thanks
Dave
Comment