Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

store data between razor pages

//When you redirect somewhere, you can also set this values that will show in the url of
//the next page, you can also send other data, not only strings
public IActionResult OnGet()
{
    return RedirectToPage("Query", new { name1 = "value1"});
}

//Then, inside the onget method you can get the value with an external variable
    public void OnGet(string name)
    {
        Name = name;
    }

Comment

PREVIOUS NEXT
Code Example
Csharp :: wpf change foreground c# 
Csharp :: unity reload active scene 
Csharp :: redis cache repository .net 
Csharp :: int model property shows 0 in textbox .net core 
Csharp :: linq select max value from list 
Csharp :: dynamic add event control c# 
Csharp :: connect to a database and loop over a recordset in C# 
Csharp :: GetComponent<Button().onClick 
Csharp :: how to fade c# form 
Csharp :: c# split quotation 
Csharp :: c# try parse date yyyymmdd 
Csharp :: structure in c sharp with example 
Csharp :: regex only letters and numbers c# 
Csharp :: c# multiplicate char 
Csharp :: stroke dash array wpf 
Csharp :: c# unit test exception using try catch 
Csharp :: 2d array 
Csharp :: net user add ne user windows 10 
Csharp :: ##[error]Dotnet command failed with non-zero exit code on the following projects 
Csharp :: c# get private property 
Csharp :: foreach for IEnumerable 
Csharp :: if or statement c# 
Csharp :: c# get all id of list object 
Csharp :: change physics material unity 
Csharp :: csv to xml using xmldocument c# 
Csharp :: triangle calculator 
Csharp :: c# how to return a function 
Csharp :: logical operators in c# 
Csharp :: Unity Input Key Message 
Csharp :: lock a cache in asp.net 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =