I am trying to use literalcontrol to add a button as input type="submit"
litLevelList.Text += string.Format(" < input type='submit' id='{0}' value='{1}' name='{2}' >", btnSave.ClientID, Lang.Trans("Save Changes " ) , btnSave. ??);
I could get the button ID using CLientID but without the name the data doesnt seems to be submitted.
Could anyone tell me how i could access the name value rendered by ASP for a button control.
thanks, vishnu
If you really must build the control, try using a HtmlGenericControl or a PlaceHolder control
http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmlgenericcontrol.aspx
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.placeholder.aspx
UPDATE
This works for me: