DataSource Controls :: Accessing The Data In The Objectdatasource?

Feb 14, 2010

I have a webpage that uses a formview. The formview gets the data from the objectdatasource which connects to a query in a table adapter.

I wanted to add a hyperlink in the page right below the formview that will "hyperlink" to another page passing parameters. Those parameters are values from the formview.

Can I just access the parameters of objectdatasource from outside the formview as follows?(it isn't working)?:

<asp:HyperLink
ID="HyperLink215"
NavigateUrl='<%# Eval("VIN", "Contact.aspx?Subject={0}") %>'
runat="server">Contact Us Regarding This Vehicle</asp:HyperLink>

If not, can I access those parameters in codebehind and do a redirect from there? How do I access the data of objectdatasource from codebehind? If I can do that, I could just put a button. Then in the button's click even, I could do the redirect.

View 4 Replies


Similar Messages:

DataSource Controls :: Binding DataTable Data To ObjectDataSource?

Sep 7, 2010

I am trying to bind a DataTable into a ObjectDataSource. This ObjectDataSource data will be used to bind into my LocalReport in ReportViewer. I have already successfully binded my data into the DataTable. My problem now is how do i bind the data in my DataTable into the ObjectDataSource so that it can be used in my report?

Here is my current codes:

ASPX:

[Code]....

VB:

[Code]....

View 6 Replies

Forms Data Controls :: How To Dyamically Bind ObjectDataSource To New Datasource

Sep 23, 2010

Before i talk about my situation or problem let me tell you all that i'm new to ObjectDataSource, ListView.

i've following controls

Three LinkButtonOne ObjectDataSource Control (which is binded to custom Business object) . Paging is enabledListView (This is binded with ObjectDataSource Control)

Requirements:

By default ObjectDataSource should be bounded to DataSource A, thus the user should see on page load the default data from DataSource A.When user Clicks on respective LinkButton, the ObjectDataSource should now be binded to new DataSource B, thus the user should now see data in ListView from DataSource B. The same should happen with LinkButton C respecctively

View 1 Replies

Accessing An Object That Implements SelectMethod For ObjectDataSource?

Nov 8, 2010

Is it possible to access an object that is used by ObjectDataSource to retrieve records? For example,

<asp:ObjectDataSource ID="MyDS" runat="server"
SelectMethod="getUsers"
TypeName="DataSources.UserDS"
SelectCountMethod = "getUserNum"/>... </asp:ObjectDataSource>

UserDS class has getUsers that returns DataTable and getUserNum that returns int, this part works as it's supposed. But I wonder if can access the instance of UserDS somehow (not underlying DataTable)?

View 1 Replies

Accessing BLL With ObjectDataSource - Could Not Find A Non-generic Method?

Nov 25, 2010

I'm a starting C# programmer and I'm experiencing the following problem.I've created a dataset in Visual Studio With a table for persons making use of two table adapters, one for selecting all persons and one for selecting one person at a time filtered by the personID (Guid). This is a seperate project of my solution. After that I created a new project for the Business Logic Layer

private PersonenTableAdapter personenAdapter = null;
protected PersonenTableAdapter Adapter
{get....}
[System.ComponentModel.DataObjectMethodAttribute (System.ComponentModel.DataObjectMethodType.Select, true)]
public DAL.Testdatabase.PersonenDataTable GetPersonen()
{...}
[System.ComponentModel.DataObjectMethodAttribute (System.ComponentModel.DataObjectMethodType.Select, false)]
public DAL.Testdatabase.PersonenDataTable GetPersonenByID(Guid ID)
{...}
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
public bool updatePersoon(string Voornaam, string Achternaam, string Geslacht, string Adres, string Huisnr, string Postcode, string Plaats, string Telnr, string GSM, string BSN, DateTime? CreateDate, string CreatedBy, DateTime? LastModifiedDate, string LastModifiedBy, bool? Actief, DateTime? DatumInactief, Guid ID)
{...}
When issueing the Update method using a detailsview with an Objectdatasource i get the following error.
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'updatePersoon' that has parameters: Voornaam, Achternaam, Geslacht, Adres, HuisNr, Postcode, Plaats, Telnr, GSM, BSN, CreateDate, CreatedBy, LastModifiedDate, LastModifiedBy, Actief, DatumInactief, original_ID.

View 1 Replies

DataSource Controls :: ObjectDatasource And Class As Datasource

Jun 24, 2010

I am really having a hard time trying to write something from scratch I created a 'Person' Class.Public Class Person

Private _FirstName As String = ""
Private _LastName As String = ""
Private _Age As Integer = 0
Public Sub New(ByVal FirstName As String, ByVal LastName As String, ByVal Age As Integer)
FirstName = FirstName
_LastName = LastName
_Age = Age
[code]...

View 1 Replies

Forms Data Controls :: Accessing An Object Used As A Datasource In Gridview On Postback?

Feb 1, 2010

I am using a list of objects as a datasource and passing the object into a user control. I use the code outlined below

[code]...

When I try to access the object this way, it's null.

Funny thing, I can access the user control and all the control data in the user control, but the object (both in the gridview and passed to the user control) are null.

View 1 Replies

DataSource Controls :: Objectdatasource Does Not Run?

Jan 26, 2010

I have set the objectdatasource in the web form. Does I need to check anything as I find that method "objProductSuppliment_Inserted" does not run??

-----------------------------------------------------------------------------------------------------------

<asp:ObjectDataSource ID="objProductSuppliment" runat="server"
OnInserted="objProductSuppliment_Inserted"
TypeName="BLL.WMS.ProductSuppliment"

[code]...

View 6 Replies

DataSource Controls :: Objectdatasource Does Not Bind The Name And ID?

Jan 16, 2011

I've created a query in the table adapter for retrieving customer name based on the first letter. The query is executed fine, and the output is the customer name and ID. A Customer BLL accesses this query, and sends the results to an objectdatasource. This control is configured to use this customer-by-letter query. However for some reason, this objectdatasource does not bind the name and ID, but instead all the other fields produced by the main query in the table adapter (i.e. name, address, phone, etc....).

I'm probably not configuring something correctly, but I'm not sure what.

The BLL code:

[Code]....

The .net code:

[Code]....

View 4 Replies

DataSource Controls :: BLL Add Method & ObjectDataSource?

Jan 4, 2011

My Business Logic Layer has AddItem method that add's to Items table in db along with an entry in Balance table.AddItem method uses two TableAdapters Items & Balance. Both these have corresponding Business Objects as Item and Balance.

Here is the AddItem method :

[Code]....

ASPX Page with DetailsView & ObjectDataSource

[Code]....

Now executing this page generates error as

ObjectDataSource 'ObjectDataSource2' could not find a non-generic method 'AddItem' that has parameters: _item, _balance, ItemName, GroupId, CategoryId, AuId, Rate, TotalStrScale, OffsStrScale, OffsAE [code]...

View 1 Replies

DataSource Controls :: ObjectDataSource With BLL Methods?

Jun 22, 2010

I'm creating an ASP.net website with 3 layers (Presentation, BLL and DAL).

BLL and DAL are 'class library'. DAL has a typed dataset. Presentation refers BLL and BLL refers DAL.

I wanna populate my GridViews with ObjectDataSource, but it only shows me the DAL. Nothing from BLL...

What am I doing wrong?

View 2 Replies

DataSource Controls :: Complex ObjectDataSource And ASP?

Apr 17, 2010

Consider a fairly complex business object. For the sake of discussion, let's think about a "ClassRoom" object - that will have some attributes which occur once, such as "capacity" and "area". It will also have some repeating attributes - perhaps "desks" which will itself be a collection of desk objects. The desk object will in turn have attributes such as "width" and "height".My example is more complex, but that should show where I am coming from. The business object, as you would expect, exposes methods to get the attributes in and out. There is also logic included to perform the underlying database updates. Of course, the necessary business validation is also in there.

In terms of binding to the ASP page, I will need to bind the attributes of "ClassRoom" to a set of fields on the page (using one method on the object). I will also want to bind the desks collection to a Repeater or GridView (using another method on the object).Presumably, I need to find a way to use a single instance of the ObjectDataSource so that the updates to the two (or more) disparate sets of data can be kept in step. I suspect that if I simply put two data sources on the page, I will get two instances and therefore no correlation between them.This can't be a unique problem, but I'm struggling to find any useful information.

View 3 Replies

DataSource Controls :: Get Value Of Column In Objectdatasource?

Jul 20, 2010

I was woundering if its possible for me to check for accesslevel value from the database using objectdatasouce.... From my coldfusion experience... i could just use an "if statement"

e.g: <cfif> (datasouce.column = x) then
<cfoutput> msg</cfoutput>
</cfif>

Am not so sure about .net.... All i am trying to do is to check for one value on the db and i dont mind puting it on code behind... i just need a way..

View 4 Replies

DataSource Controls :: How To Configure Objectdatasource

Sep 9, 2010

created my own stored procedure in SQL Server for my aspnetdb database which is :

view plaincopy
to clipboardprint?

View 1 Replies

DataSource Controls :: ObjectDataSource With Datatable?

Apr 14, 2010

Could I receive datatable or datarow as objectDataSource update function parameter? I need it because I need the datarow verison functionality to detect change for a column in the update function logic.this is what i had tried:

[Code]....

After I setup the update function in the ObjectDataSource , its DataObjectTypeName has a funny name

[Code]....

View 3 Replies

DataSource Controls :: How To Pass Variable To ObjectDataSource

Sep 10, 2010

I have an objectDataSource which uses my stored procedure GetNotifications

And my GridView is bound to that objectDataSource

the only problem is that my stored procedure requires the variable @UserName and then returns the values for that username, but I do not know how to pass the variable to the objectDataSource, does anyone know the code for this?

I can get userName from HttpContext.Current.User.Identity.Name but how do I pass that to the objectDataSource?

View 7 Replies

DataSource Controls :: How To Get Total Count From An Objectdatasource

Mar 29, 2010

I have a gridview bounded to an objectdatasource.

I want to get total count of record when there is paging = true or false in gridview.

View 4 Replies

DataSource Controls :: Passing Parameters To ObjectDataSource

Aug 9, 2010

I followd Brian Orrell LINQ tutorial for paging/sorting and created a gridview bound to an ObjectDataSource through a method call which gets data from adatabase. My form includes two buttons with a textbox next to each one of them. I need to be able to populatte th egridview depending on the button that was pressed, I cannot figure out how signal my method which button was pressed.
[Code]....
[URL]

View 1 Replies

DataSource Controls :: Can Bind Textbox With ObjectDataSource

Mar 9, 2011

Is it possible for me to have an ObjectDataSource and the bind a texbox to a certain field to it?

View 2 Replies

DataSource Controls :: Is It Possible To Bind DataTable To ObjectDataSource

Oct 31, 2010

is it possible to bind DataTable to ObjectDataSource?

View 4 Replies

DataSource Controls :: ObjectDataSource Binding To Querystring When Don't Want It To?

Sep 23, 2010

I have an ODS control populating a Telerik grid. The ODS definition is pretty simple. It's set to call a method on a static class that has one parameter (entityID). I set this parameter in the OnSelecting event. When I test this, the world is a happy place and all is fine.

Then, I pass a query string to the page (which sets various unrelated values for the page, we'll say parameters X and Y). The page call's Telerik's radgrid.Rebind() event. When this happens, an error is throw from the ODS saying that the underlying method (the static data procedure) does not support parameters X and Y.

So, why is ODS thinking it should be using any querystring values at all when I have explicitly set the entityID parameter (of type Asp:Parameter)? How do I stop this from happening?

The Html:

[Code]....

The OnSelecting:

[Code]....

I see this odsList_OnSelecting being hit and the inspection of e.InputParameters only contains my expected single entry.

View 4 Replies

DataSource Controls :: ConflictDetection In ObjectDataSource Is Not Working?

Mar 10, 2010

I am trying to update record in GridView. But ObjectDataSource is creating original_{0} and new vlaue object (exactly the same).ObjectDataSource.UpdateMethod is as follows

[Code]....

The paremeters ("original_ProductBO" and "productBO") in the above function are supposed to have different values since I am editing record in GridView and then updating it.I have the checked the query by hard coding parameter values and it works. In the ObjectDataSource_Updating(..) event, I cheked the parameters ("original_ProductBO" and "productBO") , I am getting the same values. Can anyone tell why tow parameters have the same values when I am editing record in GridView Code for the ObjectDataSourec and GridView is attached below

[Code]....

[Code]....

View 3 Replies

DataSource Controls :: LocalResourceObject Null When Used By ObjectDataSource

Feb 5, 2010

I have a dropdown list that uses an ObjectDataSource. The select method of the ObjectDataSource needs to localize the TextField, so i create a Dictionary<int, string> and use GetLocalResourceObject as such:

[Code]....

In the Local Resource file, there is status0, status1, and status2, all with a value (Deleted, Active, Inactive). The dropdown and object datasource like:

[Code]....

Now, if I use an ObjectDataSource and put the DropDownList's DataSourceID to it, I will get a null reference on the lookup to the GetLocalResourceObject. BUT If I manually set DataSource/DataBind on the dropdown list on Page_Load, it works fine:

[Code]...

OR If I move the status values to a global resource file and use GetGlobalResource instead of GetLocal, it works fine! Why can I not use an ObjectDataSource and LocalResourceObject in this way?

View 1 Replies

DataSource Controls :: Getting The ID Of The Inserted Item Using ObjectDataSource?

Aug 4, 2010

Im using Objectivation as a DAL with GridView !

I would like to link item when i create it with the InsertMethode :

I have this 2 table :

Item ( id, name )

ItemRelation( idrelation, idParentItem, idSonItem)

I have a page with a gridview with the liste of item in relation with another item (Same table) : Select * From Item where id IN ( Select idSonItem where idParentItem = @TheItem )

When i add an item from this grid i would like to link it with the current Item : So I insert the Item with the GridView InsertMethod then I do another Query an the ItemRelation with idParentItem as the courant Item and the Inserted Item as the idSonsItem !

so the question is : How to get the id of an inserted Item after i get executed the InsertMethod ?

View 4 Replies

DataSource Controls :: ObjectDataSource Update With Parameters?

Feb 16, 2010

http://msdn.microsoft.com/en-us/library/ms178538(VS.80).aspx ?I tried and got error as below, at clicking Update button in detailView

'/CaseExamples' 응용 프로그램에 서버 오류가 있습니다. ==> Server error in application program
ObjectDataSource 'EmployeeDetailsObjectDataSource'에서 매개 변수 (LastName, FirstName, Address, City, Region, PostalCode, original_FirstName, original_LastName, original_Address, original_City, original_Region, original_PostalCode, original_EmployeeID)를 사용하는
네릭이 아닌 UpdateEmployee' 메서드를 찾을 수 없습니다.

View 3 Replies







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