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

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

Accessing ModifiedBy property from API

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :SharePoint

I have a site which I did a restore from another server. I have a custom search part on my site which queries the scope for a list of files and their attributes. When I go to a document library or a list I can see that the modified by property is set to the proper value, but when I run a search through my custom search part, modifiedby is returned as 'System.String[]' for every file. If I set the source code to display the 'author' attribute, the value is returned correctly. Any ideas on why this is happening?

EDIT: I get 'System.String[] ' returned in the API for the modified by attribute, even when I upload or modify a file on the new server.


View Complete Post

More Related Resource Links

Accessing a public property of a nested user control in a master page from a pages' user control

Hi  I've got a web site that has a master page and that master page (mpMaster that has a user control (ucControl1) which has a sub user control (ucControl2), this user control has a property which accepts a value. Now, I have a page that uses the master page and on this page I have another user control (ucPageControl), I need to  find a way of setting the value in ucControl2 from ucPageControl. Is this possible at all? Many thanks Ed

Accessing Property of Webpart

Hello All   I am having one scenario where i need to access property of webpart1 in webpart2 Example : Webpart1 has property max records to display which user sets from UI side and fetch data from list upto the property set. Webpart2 also needs to display records from the same list used in webpart1 but there records displayed should be records after displayed in webpart1. i.e. if webpart1 displays records as (1,2,3) then webpart2 should display records as (4,5,6). So please let me know how i can access property of webpart1 in webpart2   I would be thankfull for any reply   Thanks & Regards Mrugank Dholakia

Accessing Custom Property in HTML???


i have a usercontrol with a few dropdownlist....n i am using that usercontrol in few pages and depending on pages those dropdownlist  can be enabled mode or disabled mode.

so i created a property:

private string _readOnly;
        public string ReadOnly
         set {
                if (value == "true")
                    ddlOTime.Enabled = false;

Now i am accessing in HTML as

<uc3:OpenTime ID="OpenTime1" OTime='<%#Bind("OpeningTime")%>' ReadOnly="true" runat="server" />

it seems to work.

Just curious know that am i going in right direction or any better approach is available?


Accessing Property Value of a Custom Control by another Custom Control in Design-time



I created an Extender which has a custom property that drills down a list XML elements from an xml file, where users can select xml elements during design-time. This works perfectly fine. However, my code only has a hardcoded xml filename (source of the xml elements list) and I need to change this by maxing the xml file user-specified.

What I did is that I created another control (panel) which has a custom property that when clicked (through the ellipsis), it will allow a developer to select the xml file which is supposed to be the source xml file that the Extenders shall use. The filedialog from custom panel's property works perfectly fine.

However, my problem now is that when I drag-drop my Extender, I cannot find a way to get the property value of the custom Panel Control which contains the xml filename. I tried creating a static variable which I thought the custom controls can share but VS2010 is breaking.

Please take note that my problem is on Design-time, asp.net.

Appreciate any help. Thanks a lot.

Dhon Nuevo.

Accessing an Array of Strings Property from WCF Client


First let me apologize for the elementary question, but I’m not a developer by trade and only have to put that hat on when needed for work.  However, I’ve written a WCF service that contains an array of strings as a DataMember .

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace OBCreateEForm
  public class EForm
    [DataMember(IsRequired=true, Name="EFormDocTypeName", Order=0)]
    public string EFormDocTypeName { get; set; }


Nested Databinding of Object Accessing Parent Property


I'm wondering if there's a way to access a parent properties in databinding, of if I am going to have to re-write some objects to pass down data.

Pseudo Example:

Cars Generic of Car
Car Properties: Id, Makes

Makes Generic of Make
Make Properties: Id, Name, Models

Models Generic of Model
Model Properties: Id, Name


repeater (datasource = cars)
---repeater (datasource = Makes)
..........<%# Eval("Name") %>
------repeater (datasource = Models)
..................<%# Eval("Name") %>  <%# Eval("??? Make.Id ???") %>

So in the nested repeaters, I somehow need to access the parent's Id. In this example the Make's Id.
Is this possible?

Or do I need to add Property to child objects that refer to the parents?


Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

Accessing SharePoint 2010 Data with Server-Side APIs

Accessing SharePoint data in server-side solutions is one of the most common tasks that you will perform as a SharePoint developer. SharePoint 2010 provides powerful server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.

WPF / Silverlight tutorial: Visibility property and binding

Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Is it possible to populate property choices from a database?


I'm creating my first server control, and have it working where I can set up an enum and the user can set a property's choices,  based off of that enum.  But I'd like it to pull records from a database and populate the list of choices for the property from a database.  This would allow me to add a new "Host System" to the database, and the other designers wouldn't have to get a new copy of the dll.



Custom Server Control Property not maintaining state


I have created a server control consisting of a TextArea and a div under it.  My goal is to create my own asp:TextArea type control.  the div is for a Character count of the text area and seems to work ok but i added a CharacterCountVisible property to the control that is always returning true.  See Proptery definition below


<Bindable(False), Category("Appearance"), DefaultValue("True"), Localizable(True)> Property CharacterCountVisible() As Boolean
        Return _CountBoxVisible
    End Get
    Set(ByVal value As Boolean)
        _CountBoxVisible = value
    End Set
End Property

Note the _CountBoxVisible variable is define inside the class as :

Dim _CountBoxVisible as Boolean = True

What I am trying to do is give the user/coder the option to show/utilize the char count feature.  Can make it disappear with textarea1.CharacterCountVisible = False but setting it to true will not make it display.


What am i missing





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.

Problem in accessing resource file dynamically.


Steps I have followed are
1.I have created myres.en-GB.resx file at C:.
2.then created locale specific myres.en-GB.resources using resgen at c: only,
resgen c:\myres.en-GB.resx
3.Linked the Resource File to Assembly using AL.exe which is giving me assembly at c: only.
Al /t:lib /embed:myres.en-GB.resources /out:ClassLibrary1.dll
4.I have created one web application using vs 2008 & then build it.
5.Then placed both resource file & dll in web applications Bin\en-GB folder.
6.Anf finally written code at page load like
 CultureInfo info = new CultureInfo("en-GB");
            Thread.CurrentThread.CurrentCulture = info;
            Assembly asd = Assembly.Load("ClassLibrary1");
            ResourceManager res = new ResourceManager("myres.en-GB", asd.GetSatelliteAssembly(info));
            string sdf = res.GetString("Lab1");

but after running application I m getting following error
MissingManifestResourceException", "Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Cla

Accessing Functions from a Class



I am a PHP developer and am running into a lot of issues with C# and .NET. I would like to be able to do the following in C#. (i'm not sure if it should be done this way though)

C# File:

using System;
using System.Data.Odbc;
using System.Data;
using System.Configuration;

partial class site_functions : System.Web.UI.Page

protected void Main(object sender, EventArgs e)

public static void open_database()
OdbcConnection myConn;
OdbcDataReader MyReader = null;
string strConnection = ConfigurationSettings.AppSettings["dbConnect"];

myConn = new OdbcConnection(strConnection);

public void close_database()

public void Read_Database()
//do something


<%@ Page Language="C#" CodeFile="site-functions.cs" Inherits="site_functions" ContentType="text/html" ResponseEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
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