.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

Access and Bind data wihtout using Datasource Control

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

i want to bind my gridview with a dataset with concept of caching (to minimize the database server trips). plz give me a best example to get and bind data to gridview (command line) . grid paging is also enabled so example code should be capable to rebind data at Gridview page change.  

View Complete Post

More Related Resource Links

How to bind a calendar control to a datasource

In my application, user will enter some meeting dates in one page.   In the details page, they need to see those dates to make a selection for one file number. I want to show a calendar in the details page whice will show the dates already entered. To do that I need to bind the calendar to a datasource to get the information from the database. Please guide me to do that. Thanks in advance,

I need a suggestion to bind the data in share point 2010 page.Suggest some right control to do this.

In my visual web part i need a control to display rows with grouping option. In my web part i am going to display all my document library and  announcement so that i need groping option. I need to do grouping option in the view.so what is the best control u suggest me to bind my data? 

Bind Data to a Calender Control

I have a data on my Standby _ Table look like this in database   ID EMP_NO YEAR MONTH DAY 3 10001 2010 09 17 4 10002 2010 09 18 5 10002 2010 09 19   Now I want have this data displayed in a form of a Calendar , actually a full page calendar. My senario is I have employees doing standby weekly but I want to have their standby dates displayed in a form of a calendar , can somebody please help me even if it means I have to change the table structure.   Im using a VS2008 .NET 3.5 Regards,      

control the access of data based on user id

Hi, We have a cube (Insurance related project), users are grouped under a windows user group and they have their individual user id's . Now the question is how to restrict the users to view the data only related to them based on the user id(which is included in windows user-group)...?   if any mdx query is needed tell me that also

Unable to drag data source to control to bind


I have a simple test application following the directions from http://msdn.microsoft.com/en-us/library/dd465159.aspx .  When I attempt to drag the data source onto the design surface I get the following error:

Cannot add the control to the design surface or bind to the control because the type TestApp.AdventureWorksEntities cannot be resolved.  Please try to build the project or add necessary assembly references.

The project as been built and the data source is in the same namespace.  I did a search for this error and the only hit I found was here, and mentioned Tools->Options->Extension Manager, 'Load per use extensions...'.  This option is checked.  I've tried unchecking and restarted with the same behavior.

Any ideas?


How to access the data item(current row) in the field template control?



     How to access the data item(current row) in the field template control? 

What is the best approach to bind data to ReportViewer control?


I have 2 approaches to bind data to ReportViewer control. Which one is better? Could you please give me some advice?

Approach 1: Using SqlDataAdapter

Dim dt As DataTable = New DataTable
Dim conn As SqlConnection = New SqlConnection(connString)
    Dim cmd As New SqlCommand(sql, conn)
    Dim adapter As New SqlDataAdapter(cmd)
Catch ex As Exception
End Try

Dim ds As New ReportDataSource(dataSourceName, dt)

Approach 2: Using SqlDataReader


Dim dt As New DataTable()
Dim conn As SqlConnection = New SqlConnection(connString)
    Dim cmd As New SqlCommand(sql, conn)
    Dim reader As SqlDataReader = cmd.ExecuteReader()

Catch ex As Exception
End Try

Dim ds As New ReportDataSource(dataSourceName, dt)


Best method to get data from a datasource to a calendar control


Hello all. I am kind of running in circles here. I am building a meeting calendar and want to use a calendar control to display meetings. What I would like to do is cache the datasource, and use the calendar visibledate property and dayrender event to add the records to the correct days, but I can't seem to find any way to get from one to the other. Can anyone point me in the right direction here?

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Easily manipulate data with the GridView control in ASP.NET 2.0

Last week, I introduced ASP.NET 2.0's GridView data control and covered the basics of using it. This week, I go a step further by going into the details of working with the data contained in the control. This includes viewing, editing, and deleting data. Thankfully, the GridView control makes it easy to utilize these features. Before diving into these topics, I begin with an examination of the different field types supported by the GridView control.

Sorting Data in a GridView Web Server Control

The GridView control provides built-in sorting functionality without requiring any coding. You can further customize the sort functionality of the GridView control by using custom SortExpression property values for columns as well as by using the Sorting and Sorted events

Manually sorting and paging Gridview without using datasource control

Many a times while working with Gridview we want to work with the paging and sorting functionality without using any datasource control. Gridview is flexible enough to perform these tasks without the use of any datasource control and only a few lines of code.

Dynamic Data, Domain datasource, Poco and lookups


Mr. Edward,

Excuse my question but: it is necessary to involve in our projects something more than just Dynamic Data or should we make use of all other features available in VS2010 (which will make assume taht they had been left out of the Dynamic Data framework) like: wef, poco, azure, wcf, cloud, mvc, silverllight, ajax, odata, agile, workflow, etc.?

Sorry my ignorance, I'm just transcribing names as they come to my mind and of which I don't know anything about


Carlos Porras (El Salvador)

Microsoft Application Block for Data Access in .NET


Hi all,

I was rummaging the internet learning aspx and came across the concept of: Microsoft Application Block for Data Access in .NET

It seems great of course. The articles are all early 2003-5 such as


So the question is - is this tech still relevant and should I be using it?



data access library v4.1


Ive just started a project that will use the enterprise library 4.1 data access code blocks.  Its been years since ive used them, can anyone tell me what assemblies I need to reference in my project in order to use them ?  Ive referenced 


are there any others I need ?

unable to access control inside webuser control



I have used calender web user control inside my project where i took textbox,button and calender.....but after dragging onto my aspx page....i am unable to access this textbox,calender and button on aspx page...Pls help me to find out the solution.

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