Archive for February, 2010


I have tried  customizing the DispForm.aspx and once I view the form in browser i found the people editor values are not displaying properly. Instead some HTML code was displayed.And this happened only for the people editor controls where I have allowed multiple selection.

When I opened the form in the designer I found the XSL code for the particular people editor showed

<xsl:value-of select=”@Team_x0020_Members”/>

I have added another parameter disable-output-escaping=”yes” to that line. No my code read as

<xsl:value-of select=”@Team_x0020_Members” disable-output-escaping=”yes”/>

That have done the magic.

Advertisements

  • Scrolling announcement web part which on click will take you to the given link.
  • Dynamic values and not static content.
  • Values are coming from the list with two different columns Title(Text to show) & Link (Link to redirect).
  • Uses JavaScript to scroll the content.

You can get the code here


An interesting development.

  • On clicking on the empty brick,a new form opens as a pop-up where he/she can fill the wishes.
  • Once filled the wish with name appears on the brick.
  • After all the bricks are completely filled next button will appear taking you to next wall.
  • On mouse over the message details are shown in a pop-up.

And do you believe?? Its a simple ASP.NET calendar control with some GUI changes a simple logic behind to show the multiple walls.


I was working on a SSRS report having two dropdown controls State & District which behaves as a parent -child dropdown.

My table looks like

State1 District1
State1 District2
State1 District3
State1 District4
State2 District5
State2 District6
State2 District7


And when I select State from the first Drop Down, I need the District drop down to be populated with values

~~State1~~

District1

District2

District3

~~State2~~

District4

District5

District6

District7


This way user will come to know which state the district’s belong to.To do this I used the following query.


(select [State],District from dbo.T_TownSnapshot where state in (@State)

union

select [state], ‘~~’ + state + ‘~~’ as District from dbo.T_TownSnapshot where state in (@State))


In an Item Adding event handler Properties.ListItem will be null. Same is the case with Properties.BeforeProperties & Properties.AfterProperties too. So how to get the values entered in the NewForm.aspx in the ItemAdding method. Here we go..

You can access the value using AfterProperties property. But here you have to pass the internal name of the column whose value you want to access.

properties.AfterProperties[“Internal Name of the column”]

Or in case if you don’t know/want to explicitly specify the internal name you can get the same using Field.InternalName property. The below code snippet I used explains the same.

typeName  = Convert.ToString(site.Lists[properties.ListId].Fields[“Type Of Shoes”].InternalName);
allotedShoeType = Convert.ToString(properties.AfterProperties[typeName]);

Hope it helps..