asp.net - How to get parameters out of an ascx back to the main aspx page -


I have an ASPX page that provides an essex page with filtering capabilities. Parameters are passed within the Esx page:

  & lt; Tr & gt; & Lt; Td class = "label" & gt; Platform & lt; / Td> & Lt; Td square = "field lookup" & gt; & Lt;% = Html View ("Site", blank, URL, "Sites")%> & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td class = "label" & gt; Data & lt; / Td> & Lt; Td square = "field date" & gt; & Lt;% = Html.TextBox ("s.Date", DateTime Today.tostring ("yyyy-MM-dd"))% & gt; & Lt; / Td> & Lt; / TR & gt;  

I need to be able to get those parameters on the main ASPX page, because there are those actions that are called there. How can I access these parameters?

The default of the default is available on the page and all partial views on this value Should be able to achieve. If not, you can use the item collection to pass the values ​​in the same request. In ASCs you can add value to the collection of such items:

  & lt;% this.Context.Items.Add ("myValue", myValue); & Gt%; In ASPX you can access it like this:  
  & lt;% = this.Context.Items ["myValue"]%>  

This method will work but this MVC is not the right way in the world. You must pass all the data using the model completely and display it only on visuals and partial ideas.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -