Pretty basic question.
I have 2 tables: 1 stores contact info, 1 stores equipment lists. The equipment table has a contactID field that's FKed to the contact table.
I have a page that's used to add equipment, and when the user saves the new record I want to generate an email that has all the equipment info and some pertinent details ab...
I'm writing an ASP.NET(C#) application in Visual Studio 2008 and connecting to SQLExpress 2005.
While trying to update a FormView control bound to an SqlDataSource by using a parameterized stored procedure, I constantly get an error screen saying "too many arguments specified".
I have tried clearing the list and adding all the paramete...
I am using a gridview to select, delete and update data in database. I have written a single SP for doing all these operation. Based on a parameter SP decides which operation to perform.
Here is the image of my gridview
<asp:GridView ID="GridView1" runat="server" DataSourceID="dsDomain"
AllowPaging="True" AllowSo...
I'd like to set the text of two labels to values found in a FormView on a page (whose data comes from an SQLDataSource.)
What's the best way to do this? I'm thinking of using the DataBound event for the FormView to set the label text to the value of a field in the FormView, or of using the SQLDataSource Selected event to set the labels...
I am using a gridview where i am calling a stored procedure which has 4 input parameters.
Out of these 4 parameters, values are to be given such that
DomainId = This has to be the row which is to be deleted. This is a primary key
Domain = This field has to be passed to SP as NULL.
Description= This field has to be passed as NULL.
...
I am using a sqldatasource for filling one GridView and on page loading or before taking any action, there is no data (default value=null) and normally the datagrid is empty (using emptydatatext="no records found etc etc...")..
Issue is I can not see the header of that grid in empty case, but only the emptydatatext!
I have tried to use...
I want to cange the lables in my form according to particular value in rows. I just need how to iterate through table rows.
...
Hello,
I am trying to do all on one page. There are 3 textboxes and 3 buttons, one sqldatasource and one detailsview. Sqidatasource is configured to take parameters from textboxes and ingnore blank textboxes to be able to search by one (any) field at the time. When I do "test query" in sqldatasource - everything is working. Deatailsview ...
I have the need to display a date in this format: dd/mm/yyyy. This is actually being stored in an ASP.NET textbox and being used as a control parameter for a select on the GridView. When the query is run, though, the date format should change to 'd M y' (for Oracle). It is not working. Can someone tell me what I'm doing wrong? Right now ...
Hi,
My SqlDataSource selectcommand is dynamically changed by the String.Format functionality of the Eval one-way databinding syntax. It works ok. However I need to put together two columns values with a space in the middle (ItemType + '" "' + ItemDescription As ItemInfo) but I can't get the syntax correct as I get the message: "The serv...
Gridview has many columns and a Delete button as well. Delete button is a control as TemplateField
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btnDelete" CommandName="Delete" Text='<%# Eval("disabled").ToString()=="False" ? "Disabled" : "Enabled" %>'
OnClientClick="return confirm('Are you sure you want to take this ac...
Is it possible to populate a listview with a dataset? I have a function that returns a dataset. Why im asking this is because my SQL is quite complicated and i can't convert it to a SQLDataSource...
Public Function getMessages() As DataSet
Dim dSet As DataSet = New DataSet
Dim da As SqlDataAdapter
Dim cmd As SqlCommand
D...
I'll try to explain what I'm doing the best I can, but I'm pretty new to asp.net so be patient with me.
I have a SqlDataSource which returns a simple select statement based on the WHERE clause using @COURSE_ID
What I want to-do is every time any one of 2 (this will change as it's going to be generated) asp:LinkButtons are pressed, the...
Hello,
I have a ContentPlaceHolder with a GridView that is bound to a SqlDataSource. The ID for the SqlDataSource is as follows:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" etc...
The GridView sets the DataSourceID to SqlDataSource1 as follows:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowP...
I am using the stored procedure below for the select command of a SqlDataSource, and I'm trying to pass a query string parameter, but I get this error:
Procedure or function 'ActivationCampaignGetById' expects parameter '@campaignId', which was not supplied.
The parameter is present in the query string:
http://localhost:62681/Activati...
I have a DropDownList declared like this:
<asp:DropDownList ID="campaignTypeList" runat="server" Width="150px" DataTextField="Name" DataValueField="CampaignTypeId" DataSourceID="campaignTypesDataSource" SelectedValue='<%# Bind("CampaignTypeID") %>'>
</asp:DropDownList>
Using the designer, my SqlDataSource is configured...
I haveasp:GridView displaying client requests using asp:SqlDataSource. I want to limit displayed information by client:
View.aspx has to display everything, View.aspx?client=1 has to display only requests from client ID #1.
So I'm using <asp:QueryStringParameter Name="client" QueryStringField="client" /> for query "EXEC getRequests @c...
Hello,
I'm completely new to MySql and haven't used SqlDataSource with UpdateParameters before, so I'm probably missing something very obvious.
When trying to update a record, the update does happen but then throws an error saying "'id' parameter is missing at the statement". So the query works and the database gets updated as it shoul...
If I have a SqlDataSource with
InsertCommand="INSERT [Applications] ([UserID]) VALUES (@UserID);SELECT @ApplicationID=SCOPE_IDENTITY()"
Can I use a SessionParameter to store the returned value?
<asp:SessionParameter SessionField="__ApplicationID" Name="ApplicationID" Type="int32" Direction="Output" DefaultValue="-1" />
...
I have googled for this issue but listed solutions are not working for me...
I get the following error message:
Procedure or function 'ContactHide' expects parameter '@ContactID', which was not supplied.
Here is my setup..What am I missing? Please help? Debugger shows that I am supplying ContactID correctly in my C# code behind code....