Hello
I just need to be able to remove leading zeros from the date in this literal:
<asp:Literal id="lit_Date1" runat="server" text='<%# String.Format("{0:D}",Container.DataItem("conf_date")) %>' />
So, 02 March 2005 should display as 2 March 2005. Is there a simple way to do this without...
Hello
I've got a DTS Package set up to copy some tables from one SQL server to another. However, the job I've set up via the SQL agent seems to run successfully, but doesn't actually perform the required task.
The step has the following message:
DTSRun: Loading... DTSRun: Executing...
Hi willir - not sure if I understand this. Everything is fine for several months at a time, but eventually everyone gets this error and it's impossible to configure the database in the same way.
I've tried refreshing using the linked table manager and this either works while the database...
Hello
I've got an Access front end for various SQL tables and all works well for a while, but eventually I get an error saying:
'Could not execute query; could not find linked table.
[Microsoft] [ODBC SQL Server Driver] [SQL Server] Invalid object name 'table_name' (#208)'
I've tried...
Hello
I'm using cookies to track users around a shopping cart application, but I cannot seem to retrieve a cookie value on the secure part of my site.
I'm using the following code to either generate a new ID or retrieve an existing one:
Public Function GetShoppingCartId() As String...
Hello
I'm using cookies to track users around a shopping cart application, but I cannot seem to retrieve a cookie value on the secure part of my site.
I'm using the following code to either generate a new ID or retrieve an existing one:
Public Function GetShoppingCartId() As String...
Hi chrissie1 - thanks for the tip
I've changed my validation code to:
Sub surnameCheck_ServerValidate(sender as Object, e as ServerValidateEventArgs)
Dim strValue As String = e.Value
If strValue.Length > 0 Then
e.IsValid = True
Else
e.IsValid = False
lblSurnameRow.Text = "<div...
Hello
I just need to create a custom validator to check whether a control contains a value and, if it doesn't, change the style of div tag.
I tried this:
Sub surnameCheck_ServerValidate(sender as Object, e as ServerValidateEventArgs)
Dim strValue As String = e.Value
If not...
Hello
I just need to create a custom validator to check whether a control contains a value and, if it doesn't, change the style of div tag.
I tried this:
Sub surnameCheck_ServerValidate(sender as Object, e as ServerValidateEventArgs)
Dim strValue As String = e.Value
If not strValue is...
Hello
I've got a datalist with a couple of labels in the footer. However, my code-behind cannot find the controls to populate and I get the message 'Object reference not set to an instance of an object'.
I use the following in my page load to add a value to the label:
lblTotal.Text =...
Hello
I've created a custom paging solution for a datagrid using a stored procedure, but I just need some advice on the best way to go about preserving the results should someone navigate away from the page and come back again.
The search is always initiated using a query string, and if...
Thanks Dazzled
Forgot to add that the label and button will be in a datagrid, so there will be multiple controls when the records are returned. So, I need a way of increasing the value of the label for the particular row selected.
Thanks again.
Hi
I've got a label control on which I need an onclick event so that every time a button is clicked the current value is increased by one. The label control will always contain an integer.
I'm sure this is really simple but having trouble converting the value of the label to an integer. Any...
Hello
I've got a date field in a SQL database (PubDate) and I just need to know how to retrieve records using a stored procedure depending on whether the date is either this month or last month.
The search parameter for this month or last month is passed to the stored procedure from a dropdown...
Hello
I'm putting together a shopping cart application and I have various code-behind files called searchDB.vb, catDetailsDB.vb etc. These are all grouped into a namespace called myStoreComponents.
However, on some pages I need to inherit more than one of the vb code-behind files at the same...
Hello
I use the following function in my code behind when the page loads to populate a listbox from values in a SQL table:
Public Function GetSubjects() As DataView
cmdSql = New SqlCommand("Pubs_getSubjects", myConnection)
cmdSql.CommandType = CommandType.StoredProcedure...
Hi - thanks for the comment. I've solved the problem by using this function to display an 'out of stock' message:
Protected Function CheckInStock(InStock As Object) As String
If InStock = False Then
'pubsLink.Enabled = false
Return "<span class='Text'><font...
Hi - many thanks for the link.
I've managed to create a function which can display an 'out of stock' message, but I can't find a way to disable the HyperLink control. Changing the image is fine, but users will still be able to add the product to their cart.
Any suggestions would be much...
Hello
I just need to find out the best way to add some conditional logic to a DataList. I've got the following button in my ItemTemplate:
<asp:HyperLink NavigateUrl='<%# "AddToCart.aspx?productID=" & (Container.DataItem( "ID" ))%>' Runat="server"><asp:ImageButton ID="AddtoCart"...
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.