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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Value not displaying correctly

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :ASP.Net
I'm really at a loss here.  High level description is this:  I have a value that is pulled from a session variable.  In the PageLoad method, the value is stored in a local variable.  A literal control is set on the page with that local variable and then the value is stored in the database.  There is no default value for the literal control on the aspx page.  For some reason, the literal is displaying an incorrect value, but the value placed in the database (using the same local variable) is correct.  If I hit F5 to reload the page, the correct value shows up.  I have no idea where the incorrect value is coming from.  It is a possible value, but not the correct one.  This problem only appears on the production server.  The pages work perfectly on my local machine.  Any help would be GREATLY apprecated since I'm about to go crazy trying to figure this out.  Here's some code to better explain things...This starts out on a page that has 3 choices.  If the user selects the correct value, it goes to the next page.  This works fine.  If an incorrect answer is selected, that choice will disappear, and the user will select again.  Once the correct choice is selected, the test goes to the page that has the problem.  Here's the first page:<html xmlns="http://www.w3.org/1999/xh

View Complete Post

More Related Resource Links

Problem displaying a view correctly in MVC app using HTML.TextBoxFor() with VB



I have a test app with a form view.

I cannot get the view to display correctly instead of displaying a series to text boxes it displays quoted html.

I suspect that my problem is related to my VB syntax for my Linq

The C# equivilant works but my shop uses VB so I must convert the code.

Here is the code from the view:

      <% Using (Html.BeginForm)%>
          <p>Your name: <%: Html.TextBoxFor(Function(m) m.Name).ToString%></p>
          <p>Your email: <%: Html.TextBoxFor(Function(m) m.Email).ToString%></p>
          <p>Your phone: <%: Html.TextBoxFor(Function(m) m.Phone).ToString%></p>
          <p>Will you attend? <br />
          <%  Dim slist As New Generic.List(Of SelectListItem)
          slist.Add(New SelectListItem With {.Text = "Yes", .Value = Boolean.TrueString})
          slist.Add(New SelectListItem With {.Text = "No", .Value = Boolean.FalseString})
       <%: Html.DropDownListFor(Function(m) m.WillAttend, slist, "Choose an option")%>
       <input type="submit" value="Submit RSVP" />
       <% End Using%>

Custom Task form of a SharePoint Designer workflow is not displaying correctly


We have created a custom workflow using SharePoint Designer. We are using one action “Collect Data from a User”. As you know, this action sends an email to a user with a link to a task form where user is supposed to accept or reject a request. We are encountering following issues with this form:

  1. Form is not a workflow form, it is a task item of the task list that the “Collect Data from a User” action of the workflow creates.
  2. Form opens as an item of the workflow task list in View mode (DispForm.ASPX) instead of Edit mode (EditForm. ASPX)
  3. When user clicks on “Edit Item” button, it displays all the fields of the task as editable – we want only the Approve/Reject option buttons and the comments TextBox (that we created during the workflow design) to be displayed as editable

Can someone please explain what is going on and how can we resolve the above issues?

Site not displaying Correctly


Having problems with our lab env.

Use to be able to go to the root, which has a site collection there...such as


would automatically redirect to 


That no longer works it will display the page if you type the address including the .aspx page....

And the second issue is when we go to the root site in the web application


The page is being displayed like it's missing the style sheets...and the ribbon does not show either....

Not sure what happened to this farm it's a 2010 farm.....

Wondering if anyone had any ideas or has seen this before....


Thanks for the Help,


Picture Library not displaying correctly after upgrade from WSS 3.0


We recently upgraded to Sharepoint 2010 from WSS 3.0.  I used at database attach upgrade method and all went smoothly considering I'm quite inexperienced.

We don't have any custom coding in our site so the visual upgrade tool worked well.  Unfortunately, Since the upgrade I've noticed that IE8 doesn't display picture previews/thumbnails in picture libraries - instead I get a red X.  I'm not sure if it's all picture libraries or just those with spaces in the path to the picture library - they are all named "Client Photographs" so all of them have a space in their path.  Many of these picture libraries have subfolders within them.

The problem is with the view for the library, not the library itself as the pictures are there and can be opened if I open the library in Windows Explorer.  If I create a new view for the library, the new view works correctly.  If I try to modify the view for the library and then return to the library, I can no longer navigate to subfolders the display only shows the root folder of the picture library. 

I will probably run a script to create new views for each picture library in our site collection but am interested to know if anyone else has experienced this, if there are any other solutions, and what I missed in our upgrade process that caused this.

Ajax comboBox not displaying correctly after panel made visible




I have a WSP project in which i have added ajaxcontroltoolkit to SharePoint 2010 succesfully and the controls work when in basic web parts.


However i have a web part which has several panels to show / hide various sections as required, within one of the panels i have a combobox.

The panels are set a visible = false to begin with and then toggled to be displayed. 

When the panel is set visible = true i get an Javascript error of: 

Message: 'AjaxControlToolkit' is undefined


The combobox does not display correctly and won;t function.


If the panel is set as visible to begin with - it works fine, but thats not a solution to something which should work.


I have tried various workarounds - but nothing is working.

  • changed scriptmanager on master page to ToolkitScriptManager 
  • add javascript to resize the combobox when its made visible

Is there away to get this working?




Sharepoint 3.0 Contact List not displaying correctly.



I recently moved the MDF and log file to another drive as the server's C:\ drive was full. Upon successfully reattaching the database I have been told that peoples first names are missing from the Contact list in sharepoint.


URL is: http://server01:3000/Lists/Contacts/AllItems.aspx

I am not 100% this has to do with the move of the 2 files STSServer01_1.mdf and STSServer01_1_log.ldf, however this is what they are saying that the First names have now gone.

When clicking on Lists and > Contacts I can see that the people in the list are missing the first name.

The format used to be: Lastname, Firstname

Now I can see just: Lastname

Any ideas why this would happen and how I get it to display first/last names again? The column is called 'Contact Name'.

Also how do I find out if this list is being read from somewhere such as someones outlook or the GAL or if they just created this list (I think they just created it)

Thanks for the assistance.


Popup with ScrollViewer and VerticalScrollBarVisibility=Auto not displaying correctly in 3.5sp1


If I have a Popup which contains a ScrollViewer and I set VerticalScrollBarVisibility=Auto, if the scroll bar is required the Popup is not sized correctly. This looks like it was fixed in 4.0  ( at least my test case works in 2010 and not 2008 ) but I'm hoping there's a workaround for 2008 since I can't move to 2010 yet. Here's some example XAML which shows the issue


Calendar not displaying correctly



  When I created a new site collection the alendar is showing up without formatting.  The days of the week are abbreviated as well.  I wonder if an incorrect template is installed.


Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!

Displaying Data using ASP.NET 2.0 Repeater and C#

This tutorial will show you how to display data using the .NET Repeater Control, ASP.NET 2.0 and C#.NET

The Repeater control is a powerful tool and is easy to use.

First, you will need to import the System.Data.SqlClient namespace.

Displaying Dicom images..........



Please guide

  1. How to display Dicom images in .net web apllications.
  2. How can i convert Dicom images to Jpeg.
  3. Can uplease provide me with a sample web application??

form feild hints are not displaying for textboxses inside create user wizard?



I'm using following JS code to display input hint box besides the textbox whenever that asp.net textbox receives focus. 

I'm doing this for a registration form and all of the textboxes are inside the asp.net create user wizard control.

<script type="text/javascript">
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {

function prepareInputsForHints() {
	var inputs = document.getElementsByTagName("TextBox");
	for (var i=0; i<inputs.length; i++){
		// test to see if the hint span exists first
		if (inputs[i].parentNode.getElementsByTagName("span")[0]) {
			// the span exists!  on focus, show the hint
			inputs[i].onfocus = function () {
				this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
			// when the cursor moves away from the field, hide the hint
			inputs[i].onblur = function () {
				this.parentNode.getElementsByTagName("span")[0].style.display = "none";

displaying xsl results in browser


Hi guys,

How can I test what my xsl spits out in the browser, rather than just viewing the xsl itself?


Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

displaying dynamic added value in reports



I my application i have generated dynamic rows that contains some textbox values, i need to take those values and display in

reports. I am storing that dynamically added values in another table. please help me.

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