1

I am trying to concatenate the block of asp.net with jquery in block of jquery code :

 var srcImg = "<%:HelperClass.CheckImageUrlExist(HelperClass.Project.PathBrandImages+ "+ 
 proValByDep.brNam + ")%>";

proValByDep.brNam is the variable in my jquery.

Could anyone help me, how could I can concatenate this string?

2
  • 1
    you need to somehow let the server know (via hidden field or so) about proValByDep.brNam Commented Apr 4, 2012 at 9:13
  • Do you mean, I have to assign proValByDep.brName to the value of some hidden field or so, and then calling to use by asp.net? Commented Apr 4, 2012 at 9:18

1 Answer 1

1

The question in its current state will not work. You cannot have the ASP.NET runtime try to resolve the client-side javascript variable before your html is recieved by the client.

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.