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 <%#(ParallelMating(Eval("Gender"))%>
My CS page has
Expand|Select|Wrap|Line Numbers
- 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:<%#ParallelMating(Eval("Gender"))%>
(pleae note, the Line170 is from the aspx page)
I can only assume the <%#ParallelMating(Eval)("Gender"))%> needs to also pass a string to the code behind, but again, I have no idea how?
Thanks
Dave