Im trying to use the GridView.RowCommand that you suggested, however, at present all ive done is add the following into the defaulst.aspx.cs:
void GridView1_RowCommand(Object sender, GridViewCommandEventArgs e)
{
// Convert the row index stored in the CommandArgument
//...
Hi, I would like your opinion on the following matter:
What would be the best way of stopping a user from changing pages without saving all the details within that page first?
Im thinking of having a confomation box to ask the user if they want to swap pages without saving, but not exactly...
Hi all,
i have the following ObjectDataSource and GridView defined on my webpage:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteStockExchangeDetails"
SelectMethod="GetAllStockExchangeDetails" TypeName="StockDetails">
<DeleteParameters>...
HI all,
Im trying to add a new value to a list box.
Listbox.Items.Add("item");
This line of code above will add a value to a list box, but "item" will be insrted for the value and text field.
How would i go abouts adding a new item into the listbox with different values for the value and text...
HI guys, ive got the above working, however ive got a few extensions that id like to make to the code:
1. Id like the menus collapsed when the website is loaded. Ive tried the following, but im getting no luck:
The follwoing code is added to the top of the source file on a page of my web...
Hi all, I want to be able to hide and show content of my website by clicking on various heading links. i.e. by clickin on a specific heading, the info about that heading will appear under that heading. The content related to the heading is within a <div>.
Has any1 got any javascript code that...
Im not using a datagrid and would prefer not to redirect to another page. Is there any way of just getting a confirmation box to pop up to appear from the same page?
Hi all,
I have a button that will delete a row from a database. However, I dont really want to alow the user to delete database entries without confirmation.
What would be the best way of asking the user for conformation? A popup box?
if so, has any1 got any example code that will popup a...
Hi, ive got this far with creating a datatable. However, i can seem to find a command that enables me to output the values in the table into the listbox.
DataTable Agenttable = new DataTable("Agenttable");
Agenttable.Columns.Add("Value")...
Hi all, im using an array to add values to a listbox. The array comes from values in a database. Once the values are added to the array, the follwoing lines of code add the values in the array to the listbox.
string[] accountantArray;
accountantArray =...
HI all,
If I am half way down a page, selecting a value from a drop down box, which has autopostback enables, the page will load again, but wont take me back to the right location on the page (i.e. it will take me back to the top of the page)
.
Is there any waay of taking me back to the same...
Hi all, what im looking to do is create a data function that will traverse through a database and collect values of 1 column in the database for a certain user (i.e. WHERE UserID = 1).
Has any1 got an example data function that I could use, that will output the colum of data that I require into...
I have got it to work, all that was wrong was command.ExecuteScalar(); retruns a object value.
Im pretty much sorted appart from a small error: The name 'insertidint' does not exist in the current context.
Simple, im sure. Bit i just cant sort it.
public static short...
HI all, im in a bit of a pickle!
I have the following Data Function that will insert Addresses into an AddressDetails table. The first column in the table is an auto-incremented AddressID.
My problem is, how can i get the value fo the AddressID as soon as I have inserted the new row...
Sorry about that. Ive changed them to be public properties, however, i still cant access them from my .aspx file.
Code from the date.ascx.cs file:
public partial class Date : System.Web.UI.MobileControls.MobileUserControl
{
public String Day
{
get
{
return...
Hi, ive added 3 public variable, that are set when the dropdown menu is selected. (see folloing code)
public partial class Date : System.Web.UI.MobileControls.MobileUserControl
{
public string Day;
public string Month;
public string Year;
protected void...
Hi all, ive just started using user controls. Im trying to create a user control wthat will allow me to insert a date (i.e. with three drop down lists, one for the day, one for the month and one for the year).
Ive included the user control into muy .aspx file succesfully (by dragging the user...
Hi all, jst a quick question about how i would go about adding multiple user controls onto a page, depending on the number selected in a drop down list.
i have a drop down list called NumberofChildren. From the selection (i.e. 2), I would like to add 2 child user controls (Child.ascx) onto my...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.