webforms - ValidationGroup issue - without group: `DoPostBackWithOptions`, with group: `__dopostback` -


validation works fine until make use of validationgroup. afterward form submits no validation occurs. href on linkbutton before , after use validationgroup.

before: javascript:dopostbackwithoptions(...)

after: javascript:__dopostback(...)

the causesvalidation property set true. why adding validationgroup change postback code that?

once set validationgroup on button, button should trigger matched group validator.

asp.net generates webform_dopostbackwithoptions because there group validator on page matching button's attribute ‘validationgroup’.

your link button markup code should similar that:

    <input type="submit" name="btngroup1" value="group1" onclick="javascript:webform_dopostbackwithoptions( new webform_postbackoptions('btngroup1', '', true,'group1','', false, false))" id="btngroup1" /> 

through debugging js code, should able find there js function used find group validator. function validate if 'group1' validator there.

debug js method see if can find specified group validator.

isvalidationgroupmatch 

enter image description here


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -