Html helper in c# mvc app
-
I don't know if I am in the right place to ask a question in reference to using a variable inside a view. I want the variable to go inside the @Html.EditorFor(model => variable). Any help appreciated. Thanks. UPDATE: I think I have solved my problem. My application is used to store internet sites user/password information. The data is stored in data/value pairs. The value is encrypted with my own code. I needed to run the value item through the encryption code so it could be stored in the database. I created another object with data from the database, and compared the two value objects to see if it should be saved. If so the value item was run through the encrypt code. Then the second object was unattached and the edited object saved. Thanks for the help.
-
I don't know if I am in the right place to ask a question in reference to using a variable inside a view. I want the variable to go inside the @Html.EditorFor(model => variable). Any help appreciated. Thanks. UPDATE: I think I have solved my problem. My application is used to store internet sites user/password information. The data is stored in data/value pairs. The value is encrypted with my own code. I needed to run the value item through the encryption code so it could be stored in the database. I created another object with data from the database, and compared the two value objects to see if it should be saved. If so the value item was run through the encrypt code. Then the second object was unattached and the edited object saved. Thanks for the help.
-
I don't know if I am in the right place to ask a question in reference to using a variable inside a view. I want the variable to go inside the @Html.EditorFor(model => variable). Any help appreciated. Thanks. UPDATE: I think I have solved my problem. My application is used to store internet sites user/password information. The data is stored in data/value pairs. The value is encrypted with my own code. I needed to run the value item through the encryption code so it could be stored in the database. I created another object with data from the database, and compared the two value objects to see if it should be saved. If so the value item was run through the encrypt code. Then the second object was unattached and the edited object saved. Thanks for the help.
What do you want to do with the variable ? It can be part of the model. Post a sample code for what you are trying to do.
-
You can have that variable as part of your your view model so you can use it on view. Assuming you have requirement to use it as html helper only per your code you showing in description.
Vinod, UPDATE: I think I have solved my problem. My application is used to store internet sites user/password information. The data is stored in data/value pairs. The value is encrypted with my own code. I needed to run the value item through the encryption code so it could be stored in the database. I created another object with data from the database, and compared the two value objects to see if it should be saved. If so the value item was run through the encrypt code. Then the second object was unattached and the edited object saved. Thanks for the help.
-
What do you want to do with the variable ? It can be part of the model. Post a sample code for what you are trying to do.
John, UPDATE: I think I have solved my problem. My application is used to store internet sites user/password information. The data is stored in data/value pairs. The value is encrypted with my own code. I needed to run the value item through the encryption code so it could be stored in the database. I created another object with data from the database, and compared the two value objects to see if it should be saved. If so the value item was run through the encrypt code. Then the second object was unattached and the edited object saved. Thanks for the help.