.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Arbritrary input fields on page

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :ASP.Net


I am looking for some adivce about the possbility of doing the following while working whith MVC.

Firstly sorry if the subject line is not very descriptive.

I have put something together in ASP WebForms where by I can put a few core fields on my page that identify an object, e.g. an Event Name and ID... and then I can add arbritrary fields to the aspx page that are now saved and retrieved with the "owning object". These extra fields are stored in a seperate table on the database to the primary object fields.

A short explanation of how this works:

1. I have my own version of TextBox (and other input controls) called r3d:TextBox (etc.) and this text box has XmlParent and XmlElement tags, this is done by way of an interface.

2. I have a r3dBase page that all my forms inherit from and this page check for the existstance of any r3d:TextBox (and other input controls) that have the XmlParen and XmlElement tag defiened.

3. When an iheriting form is saved the controls with the Xml tags defined are also saved, but I don't have to change any code in the code behind pages. The framework I have put in place takes care of this for me. The data is saved

4. When an inheriting page is loaded all controls with the XmlParent and XmlElement tags are populated with any data that has previously bee

View Complete Post

More Related Resource Links

How to make Hidden Fields appear on every other page when there are other data regions exist on the

Dev Environment: Visual Studio 2008 Client reporting(.rdlc) I have a client report with one hidden field and one table. The data for the hidden field come from one dataset and the data for the table comes from another dataset. Since there is huge data on the report, the table data spans multiple pages. at the same time i want the hidden field to appear on every other page along with table. i'm using these hidden for report header purposes. As an alternative i have used hidden parameters instead of Hidden Fields. Are there any alternatives other than this ? -- Praveen

Form input to output as a link on the display page (need help please)

 I have a form, the form works great and displays the information perfectly on a designated display page I have set up from its database.  One problem, I want to display it as a link to the site instead of how it is now, just plain text. Thus the user would put in the text box the site and hit submit and the site would appear of the display page.  Can anyone please assist me on this, and where to drop the hyperlink control? in the form page? or in the display page?    Below is my form code page:     <p><strong><font face="Verdana, Arial, Helvetica, sans-serif">International Access Entry      Form</font></strong></p><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Please enter information      international contact information below. This if for authorized staff only.</font></p><table width="548" border="0" cellpadding="0" cellspacing="10" bgcolor="f0f0f0">  <tr>    <td width="528"><form name="INTL_Form" method="post" action="INTL-results.asp">      <p><font face="Verdana, Arial, Helvetica, sans-serif"> </f

Display fields in page footer



I am creating an Invoice. Where company address must come at the bottom of the page.

But I cannot use any fields in header and footer. How can I serve this requirement??

any idea?

edit form page loading is slow with more fields in foundation 2010


Hi friends,

I have recently noticed that ,my list edit form page load time is more compare to old version .

I have migrated my sharepoint site from wss3.0 to foundation 2010. I have a large list with 15,000 items and 43 fields.

My new item form is loading very quickly but edit form taking more than a minute. I tried with helath reports and firebug and yslow tools.

I didn't success with any reason. I request you to send me why it happening to the edit form page only

Out of 42 field 12 fields are lookup and I have field edit permissions enabled for different users.

Let me know what can I do to improve page load time for my list edit form.





Master Page Modified/Modifiedby fields


I'm a newby programmer but ok on SharePoint2010 Architecture.

 I need to prepare a bottom of the page menu with admin details such as Last Modified and Modified by, on my MS2010 page. I can do the Div,table, text & CSS, I just need todo the fields!!

Can anyone help!Please!



Marky boy

IT Pro, Doing WSSv3 application dev

Restict access to page fields. How to show field value to members of certain group?


I have the fields that should be shown for members of one group. How to implement this behavior?

Also i need to restrict access to editing other field for all except of limited amount of persons. How to do this?


All these questions are related to Site Content Types and Page Layouts.

How to print a report one page per input parameter?


I am working on a new report, and have been asked to have a report that may have multiple part numbner, and they want the report to keep the report details seperate for each part number. How do I do this?

It seems like I would recursively be calling the report. I have not done this before. Any help is appreciated!

__________________ Clifton Dunaway

Creating dynamic input page in asp.net webform


Hi All,

We have a requirement of creating an input page which might be different for different users, changing will be in terms of number and type of fields.

How should i architect this page. Should i create page using "XML and XSLT" or "XML and database fields" or is there any more flexible way to create this type of page.

I couldn't visualise the flow in which this should be implemented.Can somebody please advise me on this.



How To: hide fields on an input form


How can I hide a field in SP 2010.  I used this code in SP 2007 but can't get it to run in the new pop-up forms in SP 2010.


function findacontrol(FieldName, action) {

   var arr = document.getElementsByTagName("!");
   // get all comments
   for (var i=0;i < arr.length; i++ )
      // now match the field name
      if (arr[i].innerHTML.indexOf(FieldName) > 0) {
       if (action == "none") {
     } else {
       return arr[i];

function hideFlds() {

   var control = findacontrol("Request Status", "none");

Unable to retrieve Lookup fields or item URL values from Library(Wiki Page Library) item when using



When I execute, "l["Category"].ToString();" and the field is a lookup field it returns, "Microsoft.SharePoint.Client.FieldLookupValue[]", on the other hand when I execute "l["Description"].ToString();" which is a normal string field I get the string(multiline) value back, any idea what could be going on here? I have tried, static/internal/displayname all with the same result(lol moment,

Change the order of list fields on Edit page?


Is there a way to change the order of the fields show up on the edit page (EditForm.aspx) and new page (NewForm.aspx)?  I know the fields can be reordered in views. 

Cannot Edit Multiple Publishing Html Fields (Additional Page Content Fields)



I’ve added new Columns of type HTML, I’ve added these columns to my content type and the follow in my page layout:

<div id="featureArea">

<PublishingWebControls:RichHtmlField ID="rhfFeatureArea" FieldName="FeatureArea"

Non-updatable page fields in the previous pages when clicked on back button.



I have the  following scenario.

I have four pages and user enters certain information and navigates to  the next page. In the last page, when user clicks on submit button it will redirect him to the confirmation page. Once the user is in the confirmation page and clicks on back button, all the fields in the previous pages must be non-updatable.

Note: User can use the back button to view his previous data but not-updatable anymore.

Can you please post some code for the above scenario ?

Restrict Number of Input Fields


How do I restrict the number of input fields in the form to match the size of the columns?

Table Columns Reads:

state: Type Char; Length: 2
zip: Type: char; Length: 5   
Phone: Type: char; Length: 12    
Fax: Type: char; Length: 12     
Email: Type: nvarchar; Length: 256 

BoundField Reads:

<asp:BoundField DataField="state" HeaderText="State:" SortExpression="state" />

<asp:BoundField DataField="zip" HeaderText="Zip Code:" SortExpression="zip" DataFormatString="{0:#####}" />

<asp:BoundField DataField="phone" HeaderText="Phone Number:" SortExpression="phone" DataFormatString="{0:(###) ###-####}" />

<asp:BoundField DataField="fax" HeaderText="Fax Number:" SortExpression="fax" DataFormatString="{0:(###) ###-####}" />

<asp:BoundField DataField="email" HeaderText="Email Address:" SortExpression="email" DataFormatString="&lt;a href=mailto:{0}&gt;{0}&lt;/a&gt"


Inheriting from publishing page content type does not allow for overriding fields in SharePoint 2010


Hi there, we are creating custom content types that inherit from the "Page" content type.  We have found that we must have the "Inherits" property set to "TRUE" or else our custom content types do not show up in the content type gallery.  If we query the site collection using management shell the content type does appear to be there, but unfortunately it will not publish from the content type hub. If we set Interits=TRUE the content type deploys properly and appears in the content type gallery, but we cannot override (change the display name) or remove any of the inherited fields. Ultimately, we would like to have our content types inherit from "Page" and also override some of the "Page" fields, but this does not appear to be possible. We have spent quite a bit of time on this issue and are wondering if this is a bug or intential behavior of the "Page" content type. Any information you can provide would be appreciated? 

P.S. We have ran similar tests inheriting from "Document" and "Item" content types and do not encounter the same issue with overriding inherited fields.


Should I make my input fields have values of Yes/No or 0/1?


Suppose I am trying to predict response to a promotional mailing.  I have many input fileds where I could either make the values 1/0 or Yes/No. For example the input field 'Lives near public transportation'. In my data I can either have it be Yes/No values or 0/1.   Which one is the better practice for the goal of data mining? Or does it matter?

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend