C# - ObjectDataSource Not Showing Up DataObjects In Configure Data Source
Oct 29, 2010I am using visual studio 2008, i included a class in the AppCode folder and wated to use its functions in ObjectDataSource.
View 4 RepliesI am using visual studio 2008, i included a class in the AppCode folder and wated to use its functions in ObjectDataSource.
View 4 RepliesI have a dataset with several tableAdapters in it. For some reason, one of them that I created doesn't show up when I try to put it into my objDataSource?
I can access and use it from codebehind (testing purposes for this post.
I'm selecting table data of the current user:
SELECT [ConfidenceLevel], [LoveLevel], [HappinessLevel] FROM [UserData] WHERE ([UserProfileID] = @UserProfileID)
I have set a control to the unique user ID and it is getting the correct value:
HTML: <asp:Label ID="userID" runat="server" Text="Labeluser"></asp:Label>
C#: userID.Text = Membership.GetUser().ProviderUserKey.ToString();
I then use it in the where clause using the Configure Data Source window unique ID = control then controlID userID(fills in .text for me)
I compile and run but nothing shows up where the table should be.
Here is the code it has created:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="ConfidenceLevel" HeaderText="ConfidenceLevel"
[Code]....
I don't know it happen just to me or Others have the same situation too . All the time when i bind a DataControl to an ObjectDataSource in "Configure Data Source" wizard of ObjectDataSource,when i set parameter source as "Control" in "ControlId" DropdownList there are TWO Item of every control in the WebForm , while it make sense be one.
View 2 RepliesI have a gridview with all columns read only except one. I want to configure the update method for the object data source to update only one column. The code i have written works when i make all columns editable but fails when i try to make only one column editable.
View 1 RepliesI downloaded the latest version of Visual Web Developer Express. I created an Access (.accdb) database with a table and one record inside it. I dropped a grid view onto my page and selected 'Configure Data Source'. It only wants (.mdb). I have searched the web and discovered bits and peices of information but nothing really in depth that shows me how to fully utilize an (.accdb) Access Database with Visual Web Developer Express Edition. Can someone give me an explanation of how to set up my .aspx page for C#?
View 9 RepliesI have an ObjectDataSource and I want to configure it from code behind , I want to set the InsertMethod , Selectmethod from Code Behind and set it to my Business Layer files
View 1 Repliescreated my own stored procedure in SQL Server for my aspnetdb database which is :
view plaincopy
to clipboardprint?
I am using Asp.net 3.5, C#, Visual Studio 2008. Ok, so I admit I am being really lazy here, but I know there's got to be a way to do this.
I have 2 identical listviews - listview1 and listview2. There is a checkbox in column 1 of both listviews, and a button on the page.
I would like to copy the rows that are checked in listview1 to listview2 when the button is pressed.
I know how to do this by looping thru listview1, but how can I do it in one step using an ObjectDataSource?
I have an ObjectDataSource and I want to configure it from code behind , I want to set the InsertMethod , Selectmethod from Code Behind and set it to my Business Layer files
View 1 RepliesI have following in many controls:
<asp:ControlParameter Name="SvcCluster_Id" ControlID="frmConfigEdit$ddlCluster" PropertyName="SelectedValue" />
Everything was good before I bumped into the problem when declarative binding (SelectedValue='<# Bind("SvcCluster_Id") >') produced the error, because value has not been found in the list. So i moved binding to the code:
protected void frmConfigEdit_DataBound(Object sender, System.EventArgs e)
{
if (frmConfigEdit.CurrentMode == FormViewMode.Edit)
{
var svcCluster_id = DataBinder.Eval(frmConfigEdit.DataItem, "SvcCluster_id");
var ddlCluster = (DropDownList)frmConfigEdit.FindControl("ddlCluster");
if (svcCluster_id != null && ddlCluster.Items.FindByValue(svcCluster_id.ToString()) != null)
{
ddlCluster.SelectedValue = svcCluster_id.ToString();
}
}
}
But now seems like this happens later than ObjectDataSource tries to access frmConfigEdit$ddlCluster...
How to manage this?
I wouldn't like to move everything to the code (I mean creating Control parameters, etc)
p.s. Oops, actually it works ok for DataBound event! Sorry.
I am scraping text in regular expressions from a site and displaying the results in a data source. When displaying the results, the last found results are being shown first... How do i make the first results found show up first?
View 8 RepliesWhen i open the The Configure Data Source wizard, the "Specify columns from a table or view" shows gray, I cannot choose it. How can I do it.
View 4 RepliesHow I can show header/footer of Asp.Net Gridview with empty data source?
View 1 RepliesWhen I use VS2008 to create a new form application, I am able to go to the Data menu select "Show Data Sources" then the "Data Sources" window appears. Then I am able to "Add New Data Source" and so on. But when I create a new Web Application. I can not do that. Am I not able to create a Data Source on web applications?
View 1 RepliesI have had a persistant problem, which occurs in "Visual Web Developer 2008" express, but also in "Visual Studio 2010"
When I drop a data control onto my webpage, and the select "Configure Data Source", the dialog box opens, but when I try and browse for the data file (could be MDB or XLS) the data file does not appear in the "Select (XML/MDB) file" - in the example below a XML file. If I set the filter to "All Files (*.*)" I can see all of the files EXCEPT the XML files.
The project is a web project, and is set to HTTP - using my local IIS.
I'm trying to link 2 objectdatasource together using the Control Parameter Source.However, I'm stuck at the screenshot below. The Next button is disabled.
View 1 RepliesI have to display the contacts in gridview.I'm using objectdatasource. I have given the select method of objdatasource below:
Code:
Imports Microsoft.VisualBasic
Imports system.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Generic
Public Class Contactmanager
Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("localConnectionString").ToString)......
I populate mete tag from database according to this thread [URL] ....
In store.aspx page i have this behinde code
protected void Page_Load(object sender, EventArgs e) {
string data = Server.UrlDecode(Request.QueryString["BehCode"]);
SqlCommand _cmd = new SqlCommand("storeInfo", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.AddWithValue("@BehCode",data);
_cn.Open();
[Code] ....
Here instead of
stringkeyword = _dr[0].ToString();
I put
string keyword = _dr["Keyword"].ToString();
But when i run website and see viewsource it doesn't show any thing in meta tag.
I recently started using SSRS 2010 and I didnt come across this issue in 2005 or 2008 versions of reporting services.
I have a report that drills down to child report1 and then that drills down to child report 2 but clicking a field in the report.
When I click on the link on the first report to go to the second report. I get this error message
"A data source instance has no tbeen supplied for the data source ''reprort2dataset"
I am not sure how to handle this error.
All reports run fine stand alone, but when I try to link them up I get that error.
I have a report viewer running the reports in an aspx page.
Where and what am i missing?
this code produces some error:
DataSet ds = services.getOrdersReport(1, "", DateTime.Parse(System.DateTime.Now.Date.ToShortDateString()));
ReportDataSource datasource = new ReportDataSource("JMJ", ds.Tables[0]);
rv.LocalReport.DataSources.Clear();
rv.LocalReport.DataSources.Add(datasource);
rv.LocalReport.Refresh();
ERROR :
A data source instance has not been supplied for the data source 'dsOrders_tblOrdersReport'
'dsOrders_tblOrdersReport' -- name of the table designed in dataset.XSD
I am getting the following error while i bind the dataset dynamically in reportviewer(Asp .net 4.0) . I have binded the dataset using stroedprocedure.
Error:A data source instance has not been supplied for the data source 'DataSet1'.
how to make my source code to display on one line instead of multiple in source view. The display drives me batty when I'm trying to find something and I would prefer to display across the page instead of multiple lines down the page.
View 2 RepliesHow can I configure membership provider to insert data on my own database
View 2 Repliesi want delete one row of my gridview,but before delete it, ask if i sure to delete that record or not.
how can i write a configure delete code for my grid view