LOSS OF DATA IN DATASOURCE
Hi PalsThis is my first time of developing an application in visual studio. Am using Linq to SqlI have a datagrid view that holds a table data. On execution it is working fine and i can enter data and...
View ArticleShould SqlDataSource Selected Event always fire?
Hi In the page load of my webpage I call a databind for a gridview.It generally calls this event handler :protectedvoid SqlDataSource1_Selected(object sender,SqlDataSourceStatusEventArgs e) However...
View ArticleA data source instance has not been supplied for the data source...
i have an webapplication and i have 2 reports first report give me list with all application i have in my database table when i click on one id of this list it shuld rediract me to the second report...
View ArticleConnection string with .mdf file
Hi EveryoneI'm making a new website with ASP.NET (visual studio 2012). First I need a connection string in my config file, like this:<connectionStrings> <add name="BookstoreConnectionString"...
View ArticleHow do you find nested listview controls in ListViewDataItem
I need to retrieve the value of checkboxes that are in a nested listview.<asp:ListView ID="StandardsListView" runat="server" DataKeyNames="Id" ><EmptyDataTemplate><table id="Table1"...
View ArticleThe age old Selecting Event not firing
I have 3 combo boxes whose datasourceID is a sqldatasource.cmbCampus (list of all University and Colleges who have organizations that are our customers)cmbOrg (list of all Organizations on a particular...
View ArticleProblem editing checkbox ListViewItems by getting new values
Is it possible to iteriate through ListViewDataItems to save changes to checkboxes in a ListView? My problem is when I modify the checkboxes the new values are not being passed to my code behind.Here...
View ArticleUse Session Variable in SelectCommand
I have a DetailsView control, that I generate after a user selects a row from a previous GridView. I would like the DetailsView to only get records where the employeeID is equal to the employee id I...
View ArticleIssues using Request with SqlDataSource
Hey everyone,Just started a course on webdev and its going well, up until this point.I cannot get my site to display information passed from a Request such as...
View ArticleSQL to copy row and change 1 column value
How do I write the sql code to copy a row within a table, but at the same time change the value of one of the columns of the row being copied? I am using SQL Server 2005, C#, stored procedures and a...
View ArticleRetreive single value from database in page load
hi,I have a database with one table. --- CustomerID, CustomerName, CustomerEmailI want to retreive the email string by CustomerID in my page load. I"m getting the CustomerID from the query string.I...
View ArticleFiltering in an SQLDatasource
In a SQLDatasource I hve the following sqlSELECT Locations.Name, COUNT(*) AS TotalCars, SUM(CASE WHEN StockType = 'NEW' OR StockType = 'DEMO' THEN 1 ELSE 0 END) AS TotalNewAndDemoCars, SUM(CASE WHEN...
View ArticleReturning DataReader from separate class file (in App_Code folder)
I am trying to improve my web app code bu moving functions to a separate Class file which in contained in the App_Code folder.My first attempt which calls a method from my web form codebehind...
View ArticleUpdate the SqlDataSource for ListView
Is it possible to pass a variable to the SelectCommand in the SqlDataSource for a ListView, lets say from a DropDownList?Right now I have a value in SelectCommand that I would like to pass a variable...
View ArticleIncorrect syntax near 's'. Unclosed quotation mark after the character string...
hi! im just wondering what makes this syntax wrong?cmd.CommandText = "SELECT * FROM Client,Project WHERE Client.ClientName = '" + client.SelectedValue + "' AND Project.ProjectName = '" +...
View Articleread data from database by datareader to textbox and update data .the textbox...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Data.SqlClient; using System.Web.UI.WebControls; using System.Configuration; using...
View ArticleConversion failed when converting the nvarchar value xxxxxxxx to data type int
I am using Sql server 2005, Asp.net 2.0. In my application i have to store a mobile number in database, and in table it is declared as nvarchar(50) (datatype). In stored procedure as it is...
View ArticleSQL - Filter on the user who is logged in
I'm a bit new to SQL and I coudnlt figure this out in my references, maybe you guys can help.I've added two collums of data (Account_Balance and Pending_Balance) to my Users table in the ASPNETDB.mdf...
View ArticleUpdate unable to find TableMapping['Table'] or DataTable 'Table'.
Hello there,I am getting this error message "Update unable to find TableMapping['Table'] or DataTable 'Table'."Code follows -If validateForm() Then Dim ds As New Data.DataSet Dim...
View ArticleInserting NULL in a TableAdapter
I have two columns not nullable (A and B) and one column nullable (C). All the columns are nvarchar.I want to insert a record and leave C null.How do I do this with:MyTableAdapter.Insert ( "A", "B",...
View Article