Web Forms :: ObjectDataSource Concept - From Where Data Is Pulling

Feb 17, 2010

I was hired to do some contract work for a short contract. I am looking at this code on this Aspx web form. What they do is load the labels for a radio button list from an ObjectDataSource object. Well this is the first time I have ever heard of an ObjectDataSource. The problem is that I don't even know where this object is pulling data from. With a SqlDataSource object, I can easily view the flyout menu to see the sql query where the data is being pulled from. Anyway, I need some figuring out where objectDataSourcePlanType lives and where it is pulling data from. I know I can't list the entire project, but I am sure someone who is familiar with ObjectDataSource

<td>Type of Plan</td>
<td><img alt="Required" src="/Images/arrow.png" /></td>
<asp:RadioButtonList ID="radioButtonListPlanType" runat="server" AutoPostBack="True" DataSourceID="objectDataSourcePlanType"
DataTextField="PlanTypeName" DataValueField="PlanTypeId" OnSelectedIndexChanged="RadioButtonListPlanType_SelectedIndexChanged"
RepeatColumns="1" RepeatDirection="Vertical" AppendDataBoundItems="true">
<asp:RequiredFieldValidator ID="requiredFieldValidator10" runat="server" ControlToValidate="radioButtonListPlanType" ErrorMessage="Type
of Plan is required."
SetFocusOnError="true" />
<asp:ObjectDataSource ID="objectDataSourcePlanType" runat="server" SelectMethod="ListPlanTypes" TypeName="Candle.Web.PlanRequest.CommonWeb">

View 2 Replies

Similar Messages:

Forms Data Controls :: Bind Gird Using The Bindlinglist Concept Of Generic Class?

Oct 13, 2010

I want to bind grid using Bindlist(Generic class) and also ensure it does not have an impact on performance of the page.

View 2 Replies

Forms Data Controls :: Pulling A Value From A Gridview?

Jun 28, 2010

I'm trying to pull a value from a Gridview so that I can create a running subtotal. I've looked at a number of examples but they all seem to fail.

Why does this not work? Each and every reference I try to make to the cells "value", comes up null.

Sample code1:


Sample code2:


In sample code 2, I get the "header text" for the column...but I know the value in the cell...so it fails on a data conversion.

View 5 Replies

Forms Data Controls :: Formview Data - Pulling Data From A SQL Database In Cases The Rows Contain One Or More Null Values

Feb 1, 2011

Using a class component, an Object data source and a formview I am successfully pulliing data from a SQL database. In some cases the rows contain one or more Null values and I would like them to be ignored completely. My simple code follows:-

<%# Eval("add_1") & ","%>
<%# Eval("Add_2") & ","%>
<%# Eval("Add_3") & ","%>


Rose Cottage, 123 New Road, Margate,

View 2 Replies

Forms Data Controls :: Pulling The Value Of A TemplateField From A GridView?

Nov 23, 2010

I have a GridView, bound to a table (Meals) in a SqlDataSource.

Into that GridView, I have added a TemplateField, which contains a DropDownList (which displays the numbers 1 - 10, added manually; no Data Binding). And, I've added a ButtonField.

When I click the Button, I want the values of some of the GridView rows PLUS whatever value was selected in the DropDownList to be pulled out and stored in a second Sql table (Orders).

Pulling the rows bound to the SqlDataSource is easy but JavaScript is needed (I think) to pull the SelectedValue from the DropDownList. I understand women more than understand JavaScript (that's how little I know) and the code below has been kindly offered by another forum user who is at a loss, himself, now.

Here's the code and the error message I'm getting.



And here's the Code Behind:


No design time errors reported but here's the run time error:

Object reference not set to an instance of an object.

On the following line:

Line 28: if (row.RowType == DataControlRowType.DataRow)

View 6 Replies

Forms Data Controls :: Pulling A Single Data Element From Checkbox In Gridview

Apr 28, 2010

I have a templated control embedding a checkbox in a GridView I have an event on the checkbox which has a loop that pulls ALL of the checked checkboxes and the associated value. I only want to pull the datavalue of the checkbox that I just checked but the properties/methods associated with that checkbox event are not giving me any sort of index or item.value from which to do this.

View 2 Replies

Forms Data Controls :: Adding Checkbox Functionality Toa System / Pulling Data From Gridview

Aug 31, 2010

I am currently adding checkbox functionality to a system. I would like to check a group of users and add them into a db table. I currently have the administrator values flowing into the db table fine but it will not insert the empID into the table from the gridview. Here is my code:[Code]....

View 5 Replies

Forms Data Controls :: Time Out Expired While Pulling Data?

Jan 7, 2010

Im generating reports with around 8000 to 10000 records in grid view , my page give me time out error if data exceeds and it gives time out exactly after 30 secs.i have given command time out = 0 in webconfig file , but it still gives me the error . i have been using command time out property in code behind also

View 2 Replies

Insert Data By Using Linq To Sql Concept?

Feb 15, 2011

I am trying to insert the data via linq to sql concept. i wrote down the code like this. here customers is the table name in which i want to insert the data. How to achieve it? following code is not working. How to insert the data via this concept.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim context As New linq_to_sql_classesDataContext
Dim custid As New Customer
custid.CustomerID = Trim(txt_custid.Text)


View 2 Replies

Forms Data Controls :: Pulling Data From Gridview To Use In Same Row

Oct 7, 2010

I use a gridview with products, in which one column lists the manufacturer, and the next colum lists the item number.This gridview works fine, but now I want to add a product image on the same row. Instead of using a stored image location, I simply want to make a link to the image like this:

"www.mywebsite.com/images/manufacturer/itemnumber.jpg "where the manufacturer and the itemnumber are the same as displayed in that particular row in the manufacturer and itemnumber columns. I am not versed well enough (yet???) to reuse the data from those two columns.

View 2 Replies

Storing Data For A Particular Time In Mvc 2.0 Using Session State Concept?

Nov 23, 2010

I am using asp.net mvc 2.0 to implement shopping cart application.My situation is , I have a order page, there i am adding the products to the Cart.Below it will show the Cart total.Next i will go to the shopping cart page to delete or editing the items.In this page it will show the same cart total as in the Order page.

But once again if i go back to the Order page to order some more products to the cart,the cart total in the order page is showing 0 amount. This is my Shopping cart controller action method,

public ActionResult ShoppingCart(int eventID)
Event e = eRepository.GetEvent(eventID);
var cart = Stalbans.Models.ShoppingCart.GetCart(this.HttpContext);


So once i will go to the shopping cart page from the order page and again coming back to the order page it has to show the same cart total. Actually data is persisted in the cart total but it is not showing .Because if you add one more item its amount will added to the existimng cart total and then shows the current cart total. So for the first time i click back at that it has to show the already existed cart total in the cart total value.

View 1 Replies

Pulling Data From Website In .NET And C#

Jun 14, 2010

I have written a web scraping program to go to a list of pages and write all the html to a file. The problem is that when I pull a block of text some of the characters get written as '�'. How do I pull those characters into my text file? Here is my code:

string baseUri = String.Format("http://www.rogersmushrooms.com/gallery/loadimage.asp?did={0}&blockName={1}", id.ToString(), name.Trim());

// our third request is for the actual webpage after the login.
HttpWebRequest request =
request.Method = "GET";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)";
//get the response object, so that we may get the session cookie.
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
// and read the response
string page = reader.ReadToEnd();
StreamWriter SW;
string filename = string.Format("{0}.txt", id.ToString());
SW = File.AppendText("C:\Share\" + filename);

View 3 Replies

C# - Methods Of Pulling Data From A Database

Dec 21, 2010

I'm getting ready to start a C# web application project and just wanted some opinions regarding pulling data from a database. As far as I can tell, I can either use C# code to access the database from the code behind (i.e. LINQ) of my web app or I can call a stored procedure that will collect all the data and then read it with a few lines of code in my code behind. I'm curious to know which of these two approaches, or any other approach, would be the most efficient, elegant, future proof and easiest to test.

View 3 Replies

C# - Pulling Data From Repeater With EnableViewState=false?

Sep 19, 2010

I am trying to avoid enabling EnableViewState..Sample code as you can see has 1 repeater and 2 textboxes inside. I bind the textboxes at page init. After a postback I want to get the updated data from the client & save in a db. The Request.Form contains the data keyed with autogenerated client ids but the repeater has 0 items after the postback. So my options seem limited to.a. Enable viewstate so I can pull the data from the repeater using Control.Find(...)b. iterate through Request.Form and find my textbox values...ultimatly the goal is to to render data from a datatable to some textboxes, allow the user to make changes then save these changes. I'd like to avoid viewstate if there is a clean alternative..ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Foo.aspx.cs" Inherits="Ads_Foo" EnableViewState="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-


View 1 Replies

Pulling Similar Data From Multiple Information Sources?

Feb 1, 2011

So I have been trying to follow serenarules posts about persistence layers, but I seem to be missing something.

The persistence layer is an architectural layer whose job is to provide an abstract interface to information storage mechanism(s).

This makes sense to me, but I am still having a hard time with this.

So in what cases is this necessary? When you are pulling similar data from multiple information sources?

View 7 Replies

Web Sharing Folder/ Data Pulling Is Pretty Slow ?

Feb 25, 2010

we have a program that we work with with in 2 different locations, both of the program instances must share the same database.what i did is to open Web Sharing folder on our server then i added on both computers this folder to their "My network places" and direct both of application to this folder which contains the database.this is how i direct the program :


D:WNKKWnkk.exe \MyServerktest

it all works fine but there is one problem, the data pulling is pretty slow when it shouldn't we have 100MB download / upload on our server and over 10MB dl/ul in our office.

some pointers:i added the shared web folder to one of our website directory and thats mean that the port the program is using is 80
is port 80 is slower then others?

View 10 Replies

DataSource Controls :: Unique Numbers For Pulling Data?

Feb 3, 2010

I currently designed a school result portal. If the students want to view their result, they input their student school number in a text box to search out their result. But this is not secured because anybody can look up any students result if you have the number which is even written on their school uniform for identification.

I have being trying to secure this result by trying to generate or code special numbers that the students will input with their school number. The special numbers will be random numbers and may be from 10 and above, it might even contain letters. How do
I code this. I believe this is the best asp.net forum. I want the students to be inputing this special unique numbers and their student numbers so that there result will be avaliable to them.

View 2 Replies

DataSource Controls :: Storing And Pulling Data In DB To Get Google Map Location

Jul 22, 2010

I have this simple project which needs to show location on a google map by pulling data from the DB.I am using asp.net, mysql DB, google map and i found out from some website that i needed to use ajax.

The process is like this

1. I have a event form where i have multiple fields to fill in and it includes a Location/Venue fields which i can enter a location by Name(Not the Co-ordination). I am located in Singapore. So all fields will be stored into the DB.

2. I have a webpage displaying a table of the data from the same DB, and it comes with a embedded Google Map. On the table, the value of the Location column will be Hyperlinked, and when i click it, it will act as a search query in the embedded google map and locate the address without reloading the page again(which i believe i gotta use iframe?)

View 3 Replies

Web Forms :: Implementing The Threadpool Concept And Have Doutbt In Threads Being Created

May 14, 2010

Am implementing the threadpool concept and have doutbt in threads being created.


Initially i gave (1,1) in semaphores and only one thread was created and it did only one task, and (5,5) created one thread and it used for all the times.

Is ter anything wrong in wat i did or any other way of doin other than semaphores. And mainly wat abt the remaining 20 threads in threadpool? its a waste of CPU right. Can i create only 5?

View 6 Replies

DataSource Controls :: Appending Data To An SQL Server Database After Pulling From An ODBC?

Jul 15, 2010

I am working on an asp webform that pulls from an ODBC datasource then puts the data in an sql server. Once the data is in the sql server several queries pull data from it to provide information for a report.

This is an example of what I am talking about

void ODBCpdEmployeeAb()
DataTable dt =


The first part gets the data from the ODBC connection and the next part stores it in an sql server table. The problem is I have these methods in the page load event of the webform so everytime it loads it just puts the exact same data in the sql server table which would then provide incorrect information on the report.

Is there a way to append the most recent data from the ODBC table to the sql server ?

View 3 Replies

Web Forms :: Restric Multiple Download Concept Implemented By Rapidshare And Hotfile

Feb 8, 2010

rapidshare,hotfile and many site they restric user to download more than one file at a time. what is their concept and how can i implement this concept by asp.net

View 1 Replies

Asp MVC Vs. Asp Web Forms / Breaking Code Design Into 3 Layers (presentation, Dal And Business) Meets MVC Concept?

Dec 20, 2010

I'm a junior programmer, i do not get the concept of MVC! My method of coding is seperating my application design into 3 layers:

Presentation Layer
Business Layer
Data Access Layer

I find it very practical to a junior developer or at least to me, so i do not really get the point of MVC since i believe MVC just tries to separate logic from UI. Right?

I decided to have this book to help me have a better idea on code design:


Note: i also decided to start learning about TDD.


Is breaking my code design into 3 layers (presentation, dal and business) meets MVC concept?

View 4 Replies

Web Forms :: Push Data To Page Instead Of Page Pulling Data?

Jun 24, 2010

I have a page that displays updated data every few seconds but instead of pulling data from database, I would like DB to push data only if the data has been changed. Is that possible?

View 10 Replies

Concept Of Sessioncookies To Asp.net?

Dec 20, 2010

I am new to ASP.Net i dont understand the concept of sessioncookiesWhat is a sessioncookie,what are the advantages of sessioncookie whats is sessioncookie is all about,how to create a sessioncookie,how to retreive values from sessioncookies,how to store values in sessioncookies.i searched in net but i dont get clear idea about the sessioncookie concept can anyone pls clarify whats is sessioncookies and its concepts and provide some code samples if possible.

View 2 Replies

Web Forms :: Pulling Value From Masterpage Textbox Into Content Page

Nov 4, 2010

I am having a slight issue with grabbing data from my masterpage into my content page (as a whole).

I have generated a public property for the my textbox and the contentpage can see this public property. But it comes across empty (even from within the masterpage). Now I guess the problem is with the property itself (possibly). It also shows as empty when I response.write it's value to the page.

Even when I call the value of the property in the masterpage it comes across as empty. The way I have this setup is that a textbox named pageTitleField has it's value updated from an iframe. All is working well and the textbox has its value updated correct upon iframe content changes. This is great. Now I just need to pass this textbox value into my content page and then set it as the document title.

see my code thus far.

My MasterPage


My MasterPage CodeFile


My ContentPage


My ContentPage CodeFile


I know the public property is being seen from the content page because if I just do a Response.Write(Master.GrabPageTitle) I see System.Web.UI.WebControls.TextBox appearing as the output of that property. So it appears hat the textbox value is not being captured in the public readonly property.

View 5 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved