Tagged Questions
0
votes
1answer
39 views
textbox shows old value after postback while database successfully update with new value
I have a GridView with radiobuttonlist template column and textbox in footer. I want the radio buttons to update immediately when selected and used this tutorial to achieve the desired functionality ...
0
votes
2answers
41 views
ASPX Codebehind - Changing SelectCommand causes sorting to revert to original data
I have a GridView attached to a SQLDatasource, it works fine, and I can sort it properly with the original data.
If I tell the codebehind to find specific information via a pre-defined SQLDataSource ...
0
votes
1answer
76 views
SQLDataSource = “Procedure or function [Name] has too many arguments specified.”
I am not sure if its asp:SqlDataSource control or it's the ASPxTreeList from DevExpress I am using but I am getting a weird error when trying to fire a Stored Procedure using the Insert() method.
...
0
votes
1answer
18 views
How to set SelectParameter in code behind in Asp.net web forms application?
I keep getting the error, Must declare the scalar variable "@inspIdFk" when attempting to use the following:
protected void rgInspections_SelectedIndexChanged(object sender, EventArgs e)
{
...
0
votes
0answers
37 views
ASP.net Gridview not showing up
I have an asp page where I show two gridview beside each other. The first one is displayed good, but I can't see the second. When I just display an identic version, two gridviews are shown.
Below you ...
0
votes
1answer
51 views
Databind() from code behind never reaches the database
My FormView wont DataBind. I get no errors, all the elements are found correctly, when I step through the code everything looks like it works as expecting. The select parameter is set and the FormView ...
0
votes
1answer
32 views
Automatically refresh SQLDataSource cache after expired
I have added SQLDataSource control on page with EnableCaching and Cache Duration is 3 hours(10800 Seconds).
I am Showing data from SQLDataSource On Page Load event. I just want to know that, After 3 ...
0
votes
0answers
15 views
using a drop down list within a details view to update a database entry in asp
I have a Details View that contains a drop down list. I have the drop down list being populated and I have the drop down list item that matches the database entry as the default selection. The problem ...
0
votes
1answer
35 views
Populate drop down list with current user value as the selected drop down list option asp
I would like to know the best approach on populating a drop down list with all database values, AND have the current value for a user be the selected index. I have the drop down list being populated ...
-1
votes
1answer
45 views
asp.net c# Repeating only 1 of 3 images related to record
i want to repeat out all items from a single category (selected via querystring) which currently works.
However, each item is currently shown (repeated) 3 times, all 3 with the same text just a ...
1
vote
0answers
19 views
SQLDATASOURCE - Updating database using datavaluefield in combobox
I update in a datagridview.
I display a combobox and selected in my datasource datatextfield and datavalue field. When I create my update command, how is it possible to select my value and not my ...
0
votes
1answer
40 views
Must declare the scalar variable, but they exist in markup
I have an SqlDataSource that i'm using for a GridView. I have used the Delete functionality of the GridView the same as iv used it for the Update function on other ones, but for some reason this is ...
0
votes
1answer
32 views
SQL Delete from DataGridView is not happening
I have a DataGridView that has delete enabled, but it never happens. The whole grid disappears (multiple rows), but the delete for the row I click never happens.
I can run the sql statement manually ...
0
votes
1answer
37 views
SqlDataSource and “Contains” when a comma or space is part of search string
I am writing an application in Asp.net with c# as code behind. I have a text box ("txtNameSearch") for the user place information into to filter a SqlDataSource, and a gridview that populates based ...
0
votes
1answer
28 views
SqlDatasource: Parameters on Select()
After reading https://msdn.microsoft.com/es-es/library/system.web.ui.webcontrols.sqldatasource.select(v=vs.110).aspx
I'm a bit confused about the Select() method of the SqlDatasource. It's easy to ...
0
votes
2answers
109 views
how to use SQL datasource wizard at runtime (Devexpress) ?
there is a component in DevExpress called SQLDataSource, this component allows you to import data from any database but not at RunTime,
I'm currently developing a module that import data from any ...
0
votes
2answers
50 views
Bind dynamic parameters to the SQL data source not working
I want to call the stored procedure on the child gridview by using a SqlDataSource.
This is what I'm doing:
<obout:Grid runat="server" ID="grid1" AutoGenerateColumns="false" PageSize="10" ...
0
votes
0answers
30 views
alert message on admin page when any user login using c#?asp.net
i have an asp.net grid i want to update its datasource from another page i am using sqldatasource1 so that grid sync with database on insert operatioon called on another page and results in updation ...
0
votes
0answers
47 views
Cannot Find Control ID in ControlParameter obtained by Request.QueryString - Asp.Net
I'm with a doubt in getting the id of a book author and add the publication of a book, and the book to be published should have an author id that was used as identity and a name as a text and an ...
0
votes
0answers
22 views
Object reference not set to an instance of an object - Database1Entities showing up as null [duplicate]
So I'm trying to import an excel file to a local database table "TopicList" and it throws this error saying Database1Entities is not set to an instance of an object. Here is my code when I try to ...
1
vote
1answer
51 views
ASP.NET Cannot find object in parameter ControlParameter
I'm trying to get value from DropDownList as a parameter for SQL query. I have a GridView and SqlDataSource. And I can't reach DropDownList ("DDLName") inside the GridView. When "DDLName" is outside ...
1
vote
1answer
458 views
Procedure or function has too many arguments specified in FormView and SQL SERVER c#
I have one stored procedure called VideoGalleryDelete . I am using FormView and Gridview to insert, update, show and delete data. VideoGallery is my primary table with PK VideoId and it has a foreign ...
0
votes
1answer
39 views
ASP.NET C# Edit SqlDataSource record without FormView
How can Edit SqlDataSource record without FormView?
I knows getting data into TextBox, But can't save changes.
protected void Page_Load(object sender, EventArgs e)
{
DataView dvSql = (DataView)...
0
votes
0answers
44 views
How to use LIKE operator on DATE/TIME using a Text control parameter in asp.net?
I am trying to use a like parameter to get the year within a date field in my database using a control parameter. I need this to work on the aspx not the aspx.cs page. Below is my code:
<asp:...
1
vote
1answer
83 views
How to assign a radiobuttonlist to a boundfield in GridView?
I imported an excel table consisting of 5 columns and 50 rows into a datatable and stored it in a database table. None of the columns are a primary key as they consist data of string, are repetitive ...
0
votes
2answers
57 views
If SQLDatasource returns 0 rows, change display:none to display:block
I have a table with content that says
0 orders found
That is currently set in css
#OrderNoExist {
display:none;
}
I'd like for the C# to change the css style for this table to block. Here's ...
0
votes
0answers
26 views
Cross FormView fields update
I have an ASP.NET page (C# codebehind) with two FormView both of these are bound to the same underlying SQL table but SQLDataSource objects feeding the forms are different because I needed two ...
-1
votes
2answers
47 views
How do I dynamically remove items from the checkboxlist
I have a CheckBoxList which is bound by an SqlDataSource control. I want to remove some items from that list according to some conditions when the page loads.
3
votes
1answer
122 views
Different SQL Datasource on Dropdownlist Selected Index Change
I have a Grid view and I want to use Two different Sql DataSources on Selecting different values from DropDownList i.e. On Selected Index Change.
Please help me How should I implement that???
I don't ...
0
votes
1answer
58 views
Separate GridView column in two with condition
I have a GridView and only SqlDataSource. In my table I have 2 types of data stored in a column. First - distribution of books in our university and second - to other branchs.
I need to separate one ...
0
votes
3answers
93 views
ASP. NET - SqlDataSource update data base
I'm learning ASP and I get stuck to update the database using asp SqlDataSource and GridView.
I have the following controls:
<asp:SqlDataSource ID="SqlDataSource1"
runat="server"
...
1
vote
1answer
338 views
How to generate the needed SQL statements to Update, Insert, Delete data in GridView?
I'm using GridView along with SqlDataSource, for selecting, updating and deleting,
and DetailsView for Inserting, the problem is, when I click one of these buttons, I get this error for the Delete ...
0
votes
0answers
25 views
Can't solve - C# SQL checking two tables and updating one
I'm trying to update a Modules table, when the user selects a course they're brought to a modules page, then they search for lecturer and select him/her.
So I know it updates my table, (because I ...
0
votes
0answers
30 views
parameterise table name in nested repeaters datasource
i want to select a column like cl1 from different tables for each row on gridview and show it on my repeater. how can i do this?
here is my code:
<asp:gridview cssclass="text-center table table-...
0
votes
1answer
117 views
Nesting Gridview inside Formview breaks insert codebehind context
I have a couple of GridViews in my FormView page and I am wanting to make an Insert row in the FooterRow of the Gridviews. Layout and everything is fine. However, as I'm building the codebehind for ...
0
votes
1answer
114 views
ASP.NET GridView won't populate from changing SqlDataSource.SelectCommand if Textbox is empty
I'm using a Textbox and a DropDownList to filter database searches. I'm using an SQLDataSource with a blank SelectCommand and then setting the command in the codebehind depending on what the user has ...
3
votes
3answers
11k views
'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
I'm using TemplateField in GridView to implement edit/delete from database.
I'm Querying Data with the SqlDataSource Control.
when I edit the Table from page I get following error:
'...
2
votes
1answer
2k views
Create SqlDataSource Filter Parameters from code behind
I`m trying to fill a gridview from a SalDataSource from code behind.
I want to filter the results using 3 text boxes: ScheduerName, Username and Summary.
My wish was to keep the aspx page as simple as ...
0
votes
1answer
48 views
how to write delete query in multiple selection?
I have a gridview in my web project and I connect it with the SqlDataSource. The select command contain fields from 3 table, and I created commandField for gridview so that users can delete their ...
1
vote
0answers
73 views
SqlDataSource control is hidden in ToolBox of Visual Studio 2012
I'm a fresher started my career with SharePoint. I created a visual web part and tried to bind data with grid view of a SqlDataSource. But I cant see the SqlDataSource control in the toolbox and its ...
0
votes
2answers
237 views
SqlDataSource requery on button click
I've got an issue with asp:SqlDataSource. I'm trying to pull some data based on a start and end date. I want this data to pull the last 24 hours on load but right now I'm just trying to pull it all ...
0
votes
1answer
83 views
Send float parameter through SqlDatasource.InsertParameter
Hi I am trying to insert a float value into database through SqlDatasource.InsertParameter but after SqlDatasource.Insert() function is executed I only see the Integer part of it inserted in database. ...
0
votes
1answer
43 views
Load inserted Items only in Listview using SqlDataSource
I have a SqlDataSource which helps a Listview to Insert/Delete new data. But, I don't want to show the existing data to the Listview using this SqlDataSource. Only the newly inserted records to be ...
0
votes
2answers
168 views
Using SqlDataSource In Visual Studio
I am having an interesting problem in visual studio (likely due to my lack of experience). I have a SqlDataSource object and a GridView object. The Gridview object is setup to use the SqlDataSource ...
1
vote
2answers
360 views
Gridview with Sqldatasource Edit/Delete buttons
I'm using asp.net with c# code behind, and all I want to do is have a gridview+sqldatasource that I can manipulate at runtime and for whatever reason the buttons don't work. I have a login page that ...
1
vote
2answers
227 views
How to use appSettings key in SqlDataSource
Web.config:
<appSettings file="Application.config">
<add key="stringC" value="Data Source=svr1;Initial Catalog=myDB;Integrated Security=FALSE;user=user2;pwd=@#$123pop;" />
</...
0
votes
0answers
108 views
Dynamically remove rows from a datasource/database in gridview delete button handler
I have many different data sources being linked to different tables. One for each table. I have the edit and delete buttons showing on my gridview and have the subsequent methods created in my code, ...
1
vote
1answer
166 views
How to access selected values in ASP.net template field drop down list
I have a grid view in which i have two edit template fields both with list boxes in. I need to get the value out of DropDownList6 and use it in DropDownList1's SQL connection string. i have tried ...
0
votes
3answers
720 views
The conversion of the varchar value overflowed an int column ASP.NET
I have a SqlDataSource in ASP.NET that is returning an error
unhandled System.Data.SqlClient.SQLException, The conversion of the varchar value '5157964168' overflowed an int column
I am not sure ...
0
votes
1answer
1k views
how to get all data from GridView before the paging occurs
I have GridView that have a SqlDataSource as DataSource. The GridView has its PageSize property set to 10 and AllowPaging to true. What I am trying to achieve is to get all rows data from the ...