0

I have this query on my typed dataset that is used to fill my ReportViewer

SELECT        proj.descricao AS projeto, func.descricao AS funcionalidade, clb.clube AS cliente, ch.descricao
FROM            chamados ch INNER JOIN
                         projetos proj ON ch.projeto = proj.id INNER JOIN
                         funcionalidades func ON ch.funcionalidade = func.id INNER JOIN
                         clubes clb ON ch.clube = clb.id
WHERE        (ch.responsavel = @responsavel) AND (ch.clube = @clube)

See the parameters @responsavel and @clube ? I'd like to now how to pass values for these parameters from codebehind. Thanks ! Obs: I know how to do this in windowsForms, but with web application, its different and I have no idea how it works.

1 Answer 1

1

I found the solution just now - You need to work at the ObjectDataSource1_Selecting event. I used Sessions to pass the values to one webpage to another. Here is the code:

protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            string usrValue = Session["usrValue"].ToString();
            string usrText = Session["usrText"].ToString();
            string cliente = Session["cliente"].ToString();

            e.InputParameters["responsavel"] = usrValue;
            e.InputParameters["clube"] = cliente;
        }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.