0

I would like to build some SSRS custom code that when called, accesses the textbox (the control) containing the expression and modifying it.

Is this possible? If so, how? I would like to use FindControl, but it requires access to the page object, which I am not sure how to achieve.

Most examples I can find use the 'this' object, but I do not have access to the 'this' object inside custom code.

My code:

Public Function Helloworld AS String
System.Web.UI.Page.FindControl("TextBox1")
End Function

Produces the error:

There is an error on line 1 of custom code: 
[BC30469] Reference to a non-shared member requires an object reference.
Daniel Paczuski Bak
  • 3,720
  • 8
  • 32
  • 78
  • Possible duplicate of [How do you reference a field in the Embedded Code of an SSRS report](https://stackoverflow.com/questions/1400484/how-do-you-reference-a-field-in-the-embedded-code-of-an-ssrs-report) – Crazy Cucumber Oct 29 '18 at 17:53
  • I'm not asking how to reference a field, I'm asking how to reference the TextBox control. Not the contents of that TextBox. – Daniel Paczuski Bak Oct 29 '18 at 18:07

0 Answers0