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


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

Select the current value in a dropdownlist using XSL and SharePoint

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :SharePoint
 

I'm using the row edit template below. The problem I have is that the current value is not selected when the row edit XSL template is used. The value defaults to the first item in the list. What is the best way to get the current value to be the selected item in the template below? I thought having DataValueField="{@type}" and DataTextField="{@type}" would resolve the issue, but it does not.

<asp:DropDownList runat="server"  id="ff3{$Pos}" 
 DataValueField="{@type}"  DataTextField="{@type}"  
 __designer:bind="{ddwrt:DataBind('u',concat('ff3',$Pos),'SelectedValue','TextChanged',',string($XPath),'@type')}">
 <asp:ListItem>1</asp:ListItem>
 <asp:ListItem>2</asp:ListItem>
 <asp:ListItem>3</asp:ListItem> 
</asp:DropDownList > 




View Complete Post


More Related Resource Links

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

  
Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

create current user filter in sharepoint designer or wss3

  
hi, how can i create a current user filter in sharepoint designer?

SharePoint 2010 Publishing Site : Operation is not valid due to the current state of the object.

  
  I think as usual, the new version of SharePoint 2010 has a lot of problems. the below messege appear in a publushing site (FBA) enabled and when I try to access the pages list or even approve a page of accessing the SiteCollectionImages list and ......... etc every link produce the below error. I'm very frustrated with 2010.  Server Error in '/' Application. <nativehr>0x8107058a</nativehr><nativestack></nativestack>Operation is not valid due to the current state of the object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: <nativehr>0x8107058a</nativehr><nativestack></nativestack>Operation is not valid due to the current state of the object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [COMException (0x8107058a): <nativehr>0x8107058a</nativehr><nativestack></nativestack>Operation is not valid due to the current state of the object.] Microsoft.SharePoint.Library.SPR

get current selected langauage in sharepoint foundation 2010

  
Hi every one,                 My need to get current selected language in SharePoint Foundation 2010 site.  I use web.SupportedUICultures but it is return all language,  But my need is current selected language. How I get this.        

How to get "Current Date" on SharePoint Designer for Invoice Ageing Data View Report??

  
Hi Experts, I would like to know how can i get/show "Current Date" in SharePoint Designer ?? Any good tutorial ? FYI, I need this "Current Date" for my Ageing Data View Report, Purpose To offset with "Invoice Receive Date" to get total days of payment payable for the invoice. Please assists, Thanks

How to pass current user's login name as parameter to a RDL . (SSRS integration with sharepoint)

  
I have a webmethod which has two parameters. One is for year and another is for Currently logged in user. I call this method in RDL file. From RDL File how can we pass Currently logged in user's login name? I tried  with USER!UserID. It is passing the USERID but i need to pass the login name(SPWEB.currentuser.loginname)  

how to get current logged in user in sharepoint

  
hi im trying to get current logged in user from sharepoint site. All im getting is domain/administrator. I tried following. SPUser and delegation with elevated privilege. they are also not working for me. following is the code im working. spsite site = new spsite("some site")  spweb web = site.openweb() then im using spuser object to get the user. i went to the following link but it seems that guy was also not able to do this.... http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/4101e616-db5d-4504-ad16-169ff62269fb/   any idea... thanks Aqi

how to get the current date and time using sharepoint designer workflows

  
hi, how to send an email using sharepoint designer workflow when an item equals to end time. How to get the current date and time.I am able to capture the date but not the time  the time is showing as 12:00:00 AM. First i have create an variable  and storing the date and time in that variable and i am comparing the variable value with end time. If both are equal then i want to send an mail to attendees

SharePoint 2010 - The license state for the current server doesn't match the farm's license state.

  
I already have a SharePoint 2010 server built, up and running. Yesterday I built a brand new server Windows 2008 and installed all necessary windows updates. Then I joined the server to the domain where the other SharePoint 2010 box is. Today, I installed all necessary pre-requisites for SharePoint 2010 including the KB971831. After that I installed SharePoint 2010 binaries on the new server. When I run the configuration wizard now, it sees the database server with the configuration database, but will not allow me to join the new server to the farm. I get the following error in the diagnostic logs. Resource retrieved id ConfigurationDatabaseTaskConnectFailConfigDisplayLabel is Failed to connect to the configuration database. 02/18/2010 17:54:12 8 INF Leaving function StringResourceManager.GetResourceString 02/18/2010 17:54:12 8 ERR Failed to connect to the configuration database.   An exception of type System.InvalidOperationException was thrown. Additional exception information: The current server cannot be joined to this farm because the set of installed products does not match the products installed in the farm.   The license state for the current server doesn't match the farm's license state. System.InvalidOperationException: The current server cannot be joined to this farm because the set of installed products does not match the products installed in the farm.

Changing a current SQL 2008 Express Sharepoint instance to incl. Reporting services

  
I have a current instance of SQL 2008 Express that was created with a Sharepoint installation. Currently, that is the only purpose of the instance. We don't have management studio installed but from what we can tell by searching help screens is that instance is on SP 1 (10.1.2531.0) with Database Engine Services and SQL Server Replication. We need to now add Reporting Services. If we go to the Installation Tools to Add/Change the current instance, it asks for the SQL media which was from the original Sharepoint install. I have downloaded SQL 2008 Express with Advanced Tools but not SP 1. I've seen some threads where this wasn't a direct install. Ideally, I'd like to be able to change the current instance to add Reporting Services. When the wizard prompts for the media, will I be able to now point to the downloaed SQL Express w/ Adv. Tools even if it's not SP1? Thanks for your help. Tracy

How to get current user in an action of a workflow (without .NET coding) in SharePoint Designer

  

Does somebody know how to get current user (logon user) in an action of a workflow definition from the Sharepoint Designer 2007. I know how to do it by using .NET coding, but it requires to upload a dll to the bin directory of the application which is not an option due to my company Sharepoint policies.


Select Item from Dropdownlist

  

I have a dropdown list created via MVCContrib FluentHTML - how do I perform a postback when the user selects any item in the dropdownlist? 


SharePoint Search in Current Variation Scope

  

Hi All,
In Multilingual SharePoint  Portal, I have created english US as standard language and german as a first variation.
when I search anything in German Variation , I get the results from both the variations i.e en-US & de-DE(German).
If I want search result from the current variation only then how can we implement this?
mer


HTTPContext.Current.Session is NULL in SharePoint 2007 (MOSS)

  

For some strange reason HTTPContext.Current.Session is null in SharePoint 2007 web application.

Session is enabled everywhere and used to work so its not a setup issue. Something got corrupted at some point either via patches or something...

Doing "Reset To Definition" fixes the issue, but I can't do that in production environment and what is reset to definition has to do with session being null?

Searching on the web found a post from someone having same exact issue:

http://spbartnet.wordpress.com/2010/05/26/session-state-behaving-strange/

I need to know how to FIX this w/o doing complete "Reset To Definition".


accees the current sharepoint site url

  

hi i am using inline code below

<%@ Page Language="C#"  %> 

<%@ Import Namespace="Microsoft.SharePoint" %> 

<script runat="server"> 

    private void Page_Load(object sender, EventArgs e) 

    {

        btnCancel.Attributes.Add("OnClick", "window.close();");

        try

        {

          SPSite _siteCollection = SPControl.GetContextSite(Context);

            SPWeb _web = _siteCollection.OpenWeb();

            SPUser _user = _web.CurrentUser;

            txtName.Text = _user.Name;

            txtEmail.Text = _user.Email;

        }

        catch (Exception ex)

        {

Response.Write(ex);

        }

    }

</script>

Error:An error occurred during the compil

download current files in sharepoint

  

I am trying to download documents uploaded on my company's sharepoint server.

We have thousands of documents uploaded, and I would like to download all these files at once to a livedrive.

i thought it would be under "actions" but i couldn't find such thing as download all documents in libraries.

if someone knows how to do this, please reply. Thanks!


Categories: 
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