Hi donsdgr81,
thanks for the reply. But I wanted to do the job through C# code.
I found a solution. here it is...
The properties ShowInNewForm and ShowInEditForm did the job for me.
string newField = "<Field Type=\"URL\" ShowInNewForm=\"FALSE\"
ShowInEditForm=\"FALSE\" DisplayName=\"NotesIcon\" Format=\"Image\"
Name=\"NotesIcon\"/>";
fields.AddFieldAsXml(newField, true, SPAddFieldOptions.Default);
Thanks and regards,
Arun Dutt
Software Engineer, OptimusBT-India