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


Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

How to populate RadioButtonList using 3-tier Logic

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net
 

The below code doesn't work becuase I need to somehow feed the DataText and Value fields. I need to somehow amend the code to allow me to populate my RadioButtonList and to fit inside my 3-tier architecture.  My first time doing this so I'm a little lost.

rblAnswers.DataSource = rblDataSource(QuestionID)
' rblAnswers.DataTextField = dt.Columns(1).ToString
' rblAnswers.DataValueField = dt.Columns(0).ToString

'Calls

 Private Function rblDataSource(ByVal QuestionID As Integer) As DataTable

        Dim SurveyID As Integer = Convert.ToInt32(Request.QueryString("id"))

        Dim p As New SurveyDAL()
        Dim dTable As New DataTable()
        Try
            dTable = p.GetAnswers(SurveyID, QuestionID)
        Catch ee As Exception
            lblMessage.Text = ee.Message.ToString()
        Finally
            p = Nothing
        End Try

        Return dTable
    End Function


'Which Calls

Public Function GetAnswers(ByVal ID As Integer, ByVal Question As Integer) As DataTable

        Dim conn As New SqlConnection(connStr)
        Dim dAd As New SqlDataAdapter("GetAnswers", conn)
        dAd.SelectCommand.CommandType = CommandType.StoredProcedure
        dAd.Selec


View Complete Post


More Related Resource Links

Logic behind N -Tier Application Development

  
In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

Populate RadiobuttonList from Database

  

Hello,

I am using:

 If IsDBNull(ds.Tables("tblStateDocuments").Rows(0).Item("IsPublic")) Then

 Else

 DropDownList3.SelectedValue = varDocPublic

 Dim varDocPublic As String = (ds.Tables("tblStateDocuments").Rows(0).Item("IsPublic"))

Populate asp:RadioButtonList with values from database

  

Hi All!

I have a gridview with a RadioButtonList I need to populate. It is as such"

<asp:GridView ID="GridView1" AllowPaging="true" PageSize="7" runat="server" DataSourceID="mainDS"

DataKeyNames="id" AutoGenerateColumns="False" Width="100%" RowStyle-BackColor="LightGray"

AutoGenerateEditButton="false" AutoGenerateSelectButton="false" AlternatingRowStyle-BackColor="white"

HeaderStyle-BackColor="Black" HeaderStyle-ForeColor="white" ForeColor="black"

PagerStyle-ForeColor="#1A7A5E" EmptyDataText="No Data To Display">

<Columns>

<asp:BoundField HeaderText="Question" DataField="number" ItemStyle-Wrap="false" ItemStyle-VerticalAlign="Top" />

<asp:BoundField DataField="question" ItemStyle-Wrap="false" ItemStyle-VerticalAlign="Top" />

<asp:TemplateField HeaderText="Select">

<ItemTemplate>

<asp:Label ID="Qid" Text='<%# Eval("number") %>' runat="server" Visible="false" />

<asp:RadioButtonList ID="answer" runat="server"

Three Tier Architecture with ASP.NET

  
ASP.NET supports layered architecture, and this article will illustrate how it can work with the ASP.NET presentation controls. This article focuses mainly on the GridView control, mostly because it is prevalently used in .NET development. However, the concepts work for other controls as well.

3-tier architecture in C# sample

  
This article discusses and implements 3-tier architecture using C# and a dummy customer using MS Access database. In this article I am trying to implement a small reusable component that maintains customers in 3-tier architecture. It shows how to add, update and find customer details.

Three Tier Architecture with ASP.NET

  
In my previous two articles, we talked about the use of layers, and the many different options that can be used to develop layered architecture. Layered architectures are essentially objects and work in object-oriented environments, such as ASP.NET. ASP.NET supports layered architecture, and this article will illustrate how it can work with the ASP.NET presentation controls. This article focuses mainly on the GridView control, mostly because it is prevalently used in .NET development. However, the concepts work for other controls as well.

Three Tier Architecture in ASP.NET

  
These layers are described below.

1. Application layer or Business layer
2. Business layer
a. Property layer(Sub layer of business layer)
3. data layer

Advantages of three Tier Architecture.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

  
Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

3-tier architecture in C#

  
This article discusses and implements 3-tier architecture using C# and a dummy customer using MS Access database. In this article I am trying to implement a small reusable component that maintains customers in 3-tier architecture. It shows how to add, update and find customer details.

How to create 3 tier application using LINQ

  
As you know that in 3 tier architecture there are three layers

User interface layer. (Is our Form in Windows application and .aspx page in Web application)
Data Access layer. (Which provides interface between Business logic layer and Database)
Business Logic layer.(Which stores your application logic)

Application Architecture: An N-Tier Approach - Part 1

  
Introduction

Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »


Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »


Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »



MARKETPLACE
Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Autodesk.com/Beyond-3d
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
www.microsoft.com
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
www.Microsoft.com/SQLServer
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
www.FullSail.edu
Microsoft Te

Using a trigger or anything else to populate two tables

  

Hi! I'm creating an application that's supposed to first add a record to table1, and then get the ID from that record to use when adding a record to table2, to be able to associate these two records with eachother.

The user gets to type in some values that goes to table1, and some values that goes to table2, but before the insert statement for table2 is executed i need the ID from the recently added record in table1. Some dude told me to use a trigger for the autopopulate purpose, but does that really work when i also need to save some values that's user input, and when those values doesn't get saved in table1?

Are there any other way to do this or can i send values to a trigger? I'm new to triggers and stored procedures, i don't have any particular knowledge of this, any help is appreciated!

 

Regards, Monsterbadboll


Writing codes using three tier architecture.

  

Hello all.

I am a beginner in c#.I heard that writing program with three tier architecture are easy and maintainable.

I just wanted to know with a small example on how to write three tier architecture programs.


Thanks :-)


Which tier do Linq queries belong?

  

Started in middle of a new project.  Our design architecture uses an n-tier (not MVC - no controllers) structure with Presentation, Data, Business and Service tiers.  However the lead analyst has the majoriety of code all in the Business tier claiming it all contains Business logic.  Our data tier is nothing more than a single .dbml model of the primary database to support all of the Linq queries in the Business tier.  To my mind Linq queries and classes they use are data access and belong in the data tier  but our lead analyst says they contain business logic therefore have to be in business layer.  


3 tier architecture in ASP.NET

  

Hi i want to develop an application in asp.net using 3 tier architecture . 

i know that there are three layers

  1. Data layer
  2. Business Layer
    1. Data Access Layer
    2. Business Logic Layer
  3. Presentation Layer

I am confused between Data Access Layer and Business Logic Layer.

In data access layer we develop the property classes and main class function which returns datasets, datatables and data reader to Presentation layer.

what is the use of Business Logic Layer ? what actually we do in Business logic Layer ?? we can pass data directly from data access layer to presentation layer ?? can anyone give any small example to understand ??


Pattern for huge logic

  

Hi,


I am looking for a pattern/way to code for implement Huge logical hierarchy, Basically this is to verify person details like qualification, experience, expertised-in and global region.... and issue certain access for a perion of time.

The verification process has huge number of conditions it took around 1 year to document. And now we have to develop C# to implement it, can any one help me...? a sample code will be appreciated.


Thank you

Harsha


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.

Thanks,

Russ


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