Open skyne opened 9 years ago
Have you tried adding the mvc control id generator to your Seleno host configuration?
On 25 Mar 2015, at 11:41 pm, skyne notifications@github.com wrote:
For ReplaceInputValueWith(string inputName, string value) i think i should give the input (for example a TextBox) name, but then nothing happens, the method can't fill my TextBox. This is because ReplaceInputValueWith uses HtmlControlFor<>() which requires the element's id as parameter.
I have an extensive Asp.Net MVC form with a model, this model has more objects as properties, and a forms builts up from 'model.property.property' textboxes. I tried to fill this form with Input.Model() method, but that isn't working. So i tried to fill the textboxes with Input.ReplaceInputValueWith(), checked the source of the page, the Input field's id was in form of "Propertyname_Propertyname" and name "Propertyname.PropertyName", this confused me.
So the examples: When i try to fill the TextBox with the next method, everything is just works fine.
Input.ReplaceInputValueWith("Propertyname_Propertyname", "somevalue") but with
Input.ReplaceInputValueWith(model => model.Propertyname.Propertyname, "value") or
Input.ReplaceInputValueWith("Propertyname.Propertyname", "value") nothing happens, no exception, no error just nothing.
— Reply to this email directly or view it on GitHub.
Okay, it's fixed my particural issue, the Input.Model() method now works, but not the
Input.ReplaceInputValueWith("Propertyname.Propertyname", "value")
The ReplaceInputValueWith method still needs the id of the input not the name as suggested with the name of the first parameter.
Anyway, thanks for the hint :)
Ok. That's something we can look into :).
On 26 Mar 2015, at 3:58 pm, skyne notifications@github.com wrote:
Okay, it's fixed my particural issue, the Input.Model() method now works, but not the
Input.ReplaceInputValueWith("Propertyname.Propertyname", "value") The ReplaceInputValueWith method still needs the id of the input not the name as suggested with the name of the first parameter.
Anyway, thanks for the hint :)
— Reply to this email directly or view it on GitHub.
For ReplaceInputValueWith(string inputName, string value) i think i should give the input (for example a TextBox) name, but then nothing happens, the method can't fill my TextBox. This is because ReplaceInputValueWith uses HtmlControlFor<>() which requires the element's id as parameter.
I have an extensive Asp.Net MVC form with a model, this model has more objects as properties, and a forms builts up from 'model.property.property' textboxes. I tried to fill this form with Input.Model() method, but that isn't working. So i tried to fill the textboxes with Input.ReplaceInputValueWith(), checked the source of the page, the Input field's id was in form of "Propertyname_Propertyname" and name "Propertyname.PropertyName", this confused me.
So the examples: When i try to fill the TextBox with the next method, everything is just works fine.
but with
or
nothing happens, no exception, no error just nothing.