0
votes

I am doing this to pass input to a function:

<div class="input-group">
    <input class="form-control"  @onchange="() => Setup(key)" />
</div>

@code
{
    string key;
    private async Task Setup(string key){
    ...
    }
}

I don't need to keep key after I pass it to the function. Is there a way I can do this without declaring it as a global variable?

Where do you want the value to come from, when you call Setup(key)?StriplingWarrior
Why do you need a parameter to your method? What is it used for? Is the parameter value dependent on the method call's position in the HTML?gunr2171
I want the user to enter it into a text box.Nathan Dehnel
The backend logic requires the parameter entered into the textbox. The position on the page does not matter.Nathan Dehnel
Specify what information is necessary for this question to be reopened, and I will provide it.Nathan Dehnel