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

Post New Web Links

Change the way data is passed from the provider to the consumer

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



I created a consumer in SharePoint 2010 which is receiving data from a list view.

But in order to pass the data from the list view to the consumer, I need to press the a button under the "select" column.

I want to pass the data by pressing the title of the item.

How can I implement that?

View Complete Post

More Related Resource Links

Provider selection gray, unable to change it in Data Source Creation


I am trying to create an Ad Hoc report project using SSRS2005.  We are using Oracle 10G and I have Visual Studio2005.

I have the Oracle client installed and I am an administrator.

I create a new "Report Model Project " and attempt to create a new data source, but with "Create a data source based on an existing or new connection " selected, I click on "new " where I should be able to specify the database, but the Provider shows "SqlClient Data Provider " and is grayed out so I can't change it.

How do I tell it I want to point to Oracle data?  I have no trouble normally doing this with an SSRS report but this is the first time I have tried an Ad Hoc report so I don't know what the problem is.

Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

ADO.NET: Building a Custom Data Provider for Use with the .NET Data Access Framework


The System.Data.dll assembly in the .NET Framework contains namespaces whose base classes can be used to create custom data providers. These namespaces also define a number of data access interfaces and base classes that let developers create data providers that will interoperate with other custom providers. Using the ADO.NET classes Connection, Command, DataReader, and DataAdapter, writing a provider is easier than writing one for OLE DB. This article explains these classes and their implementation, and how they can be used to write a variety of different kinds of data providers.

Bob Beauchemin

MSDN Magazine December 2001

Change data on gridview bind


Hi there,

Simple little problem. i have a gridview that shows products assigned to a customers job. They are displayed in exVAT prices. To make it easier i want to show the inc VAT prices. How can i add VAT to 1 column in this table?

How can I change the color of my clandar by data from Db

Sub DayRender(ByVal source As Object, ByVal e As DayRenderEventArgs)

            Dim i As Integer
            For i = 0 To DataGrid1.Items.Count - 1
            'If (DataGrid1.Items(i).Cells(1).Text = e.Day.Date) Then
            'If (DataGrid1.Items(i).Cells(0).Text <> "") Then
            If (DataGrid1.Items(i).Cells(1).Text.Equals(e.Day.Date.ToString)) Then

                '  e.Cell.BackColor = Color.DarkOrange
                e.Cell.BackColor = System.Drawing.Color.Red
                e.Cell.ForeColor = System.Drawing.Color.Yellow

            End If
now I click the day on clendar, which have data from db it chage color ,  How can I let when the calendar is load wich day have dat in db change color ?

    End Sub


change calendar date backColor base on data from db


I want to  change calendar date backColor base on data from db,  I only have vistual 2003 !

on mean time I have

<asp:DataGrid id="DataGrid1" style="Z-INDEX: 102; LEFT: 23px; POSITION: absolute; TOP: 271px"
		    runat="server" Font-Size="XX-Small" Font-Names="Verdana" AutoGenerateColumns="False" Visible="False">
           <asp:BoundColumn DataField="subject" HeaderText="Title"></asp:BoundColumn>
           <asp:BoundColumn DataField="posttimestart" HeaderText="Post date"></asp:BoundColumn>


Sub DayRender(ByVal source As Object, ByVal e As DayRenderEventArgs)
        Dim i As Integer
        For i = 0 To DataGrid1.Items.Count - 1
            If (DataGrid1.Items(i).Cells(1).Text = e.Day.Date) Then
                e.Cell.BackColor = Color.DarkOrange

            End If

    End Sub

when I click the day wich have data in db it change  color , but I want the page load it change color !

Thank you!

Trying to run a stored procedure from vb code with oracle data provider.



Here is my SP:

create or replace
 Open p_getuserssignon_recordset1 for
 SELECT Distinct(Userid), UserPassword, SecurityLevel, ActiveStatus
WHERE substr(UserId,1,2) <> vUid
Order By UserId;

I would like to run this SP from code and fill a gridview with the result. 

I am not sure how to go about this, as I have found several different examples, other than the one I  think I need.

I am using the oracle data provider and I have an input parameter (vUid, which will equal "zz").

First question. When filling a gridview with a result set from a stored procedure should the recordset OUT be defined as a REFCURSOR (like i did above)? 


Do you have example code as to how to execute the SP and fill a gridview?  I keep trying different variations of code i've found on the internet without any success other than getting more confused.

(I am using VS 2005, VB).

Thank you.



evaluate data in row and change text on asp:ButtonField accordingly.


I am building a website for my hockey league.


I have a gridview that displays the current weeks scheduled games. Ideally I have added a column to the end of the gridview that I would like display 1 of 3 values. If the game has already been played I would like to display the score of the game; if the game has yet to be played I would like the column blank and if someone on either team has indicated that they can't make the game I would like to display a button that says "subs needed" and take you to another page to sign up to be a sub. Can this be done? I have been able to change the background color of the line based on the two boolean flags from the database using the RowDataBound event handler but I can't seem to find a way to set the value of a specific field in my row. (The background is set for the whole row.)

Thanks in advance -eric

.Net SqlClient Data Provider connecting as sa

I recently changed the sa password on a SQL 2005 std sp3 default instance. I now see .Net SQL data provider connecting with sa login from an app server. From a trace I see: Application name: .Net Sql Client data provider NTUserName: sqluser LoginName: sa HostName: app server name LoginSID: SID for sa SessionLoginName: ssd\sqluser Sqluser is a sql server logon that is not sa. SSD\sqluser is local admin on app server and is not sa on SQL SERVER and is not in builtin/administrators either. I thought an existing session may explain it but both the app server and sql server have been restarted since the sa p/w change. Could I be misinterpreting the Profiler output? Any ideas?

RSACrytoService Provider decrypt each element with seperate key gives Bad Data

I have spent about two days. Here is my code: XmlDocument xmlDoc = new XmlDocument(); xmlDoc.PreserveWhitespace = true; xmlDoc.Load("C:\\test.xml"); CspParameters cspParams = new CspParameters(); cspParams.KeyContainerName = "XML_ENC_RSA_KEY"; RSACryptoServiceProvider rsaKey = new RSACryptoServiceProvider(cspParams); CspParameters cspParams2 = new CspParameters(); cspParams2.KeyContainerName = "XML_ENC_RSA_KEY2"; RSACryptoServiceProvider rsaKey2 = new RSACryptoServiceProvider(cspParams2); Encrypt(xmlDoc, "creditcard", "EncryptedElement1", rsaKey, "rsaKey"); Encrypt(xmlDoc, "personal", "EncryptedElement2", rsaKey2, "rsaKey"); This works gerat. Now I want to decrypt the 'creditcard' and 'personal' data elements seperately with 'rsakey' and 'rsakey2' . If do this I get Bad Data error public static void Decrypt(XmlDocument Doc, RSA Alg, string KeyName) { EncryptedXml exml = new EncryptedXml(Doc); exml.AddKeyNameMapping(KeyName, Alg); exml.DecryptDocument(); } This gives bad data since the file has been encrypted with two different keys. So I tried something like this. But I don't know how to decrypt each data element seperately.  Can someone please help? public static void DecryptElement(string ElementToEncrypt, RSA Alg, string KeyName) {

DataGrid ValidationRule or IDataErrorInfo validation code called multiple times for each data change

Following my enquiry regarding a problem in Datagrid validation, for which managing exceptions is apparently a problem, I tested the two other methods: using validation rules, or implementing the IDataErrorInfo interface. I ran into other problems there, more insidious this time. This has been done on Windows7 (32-bit), .NET 4.0.30319. 1) IDataErrorInfo When this interface is implemented, the this[string columnName] property is called four times for each modification: two times before the cell enters edit mode (with the old value in the corresponding property) two times when the new value has to be validated (with the new value) It strikes me as not really efficient, is there something wrong with my code? Here's the C# part: using System; using System.Windows; using System.Collections.ObjectModel; using System.ComponentModel; namespace DataGridTest2 { public partial class MainWindow : Window { ObservableCollection<User> users; public MainWindow() { InitializeComponent(); users = new ObservableCollection<User>() { new User { Name = "Teddy", Age = "2" }, new User { Name = "Avi", Age = "19" } }; datagrid.ItemsSource = users; datagrid.Focus(); } } public class User : INotifyPropertyChanged, IDataErrorInfo { string name; public string Name

mysql data source provider - mysql connector/net

Dear All, I having problem installing mysql connector/net 6.2.3 on my vsd 2010 because the installed went smoothly but when Im trying to use the mysql on data source provider, I cant see it on the list and when try to install/change the connector the visual studio integreation has an x mark meaning to say it was not installed on my vsd2010.  Thanks.

Develop consumer which receiving data from list view

In my page I want to display a list view. Each time a user is clicking  on an item the relevant data of the current item will be passed to a consumer web part that I will develop. What interface the list view WP inherit from? Can you give send me an example of such implementation?   Tnx Keren  

Login failed for user 'sa'. (.Net SqlClient Data Provider)

Hi,     I am able to login using windows Authentication to my DB server. But when I am trying using Sql server authentication "sa" then following error is coming:   =================================== Cannot connect to .. =================================== Login failed for user 'sa'. (.Net SqlClient Data Provider) ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476 ------------------------------ Server Name: . Error Number: 18456 Severity: 14 State: 1 Line Number: 65536 ------------------------------ Program Location:    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) &

change data source of cube

how to change data source of cube?

change the date rang in calendar depend on the data from db

if the calendar day is match with the date in db I can change the claendar 's background color  with the following code , How if I want  my calendar change color by the range of the data in my db ,  said I want the calendar change color from the starDay to endday of the event , the date rang is random what can I do ??  For Each dr In tmpds.Tables(0).Rows                    If Not dr("startDay") Is DBNull.Value Then                        Dim dtEvent As DateTime = dr("startDay").ToString

Change background colour based on data key change?

Hi there,I have a GridView with an alternating Css style. The GridView has a column called tradeId. What I want to show is an alternating colour based on a change in the tradeId. Is this possible? It will make it easier on the eye to group trades together by colour. Here's the GridView code as it is right now:<asp:GridView             ID="dtlEntryStats"             runat="server"             DataSourceID="sdsEntryStats"             DataKeyNames="tradeId"             AlternatingRowStyle-CssClass="alternating"            GridLines="None"             CssClass="gridView"            AutoGenerateRows="false"             AutoGenerateColumns="false"             AllowPaging="true"           &n
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