This worked. Thanks
JGOnline
Posts
-
DATE query -
DATE queryI have a field called occdate which I need to query. This code works fine and retreives the record
SELECT OccID FROM dbo.People_Occ WHERE (OccDate >= 01 / 08 / 2006)
However when i add a second parameter i get no results returnedSELECT OccID FROM dbo.People_Occ WHERE (OccDate >= 01 / 08 / 2006) AND (OccDate < 01 / 08 / 2007)
Can anyone tell me why? -
Centralised Coding of a menu [modified]Problem, To create a navigation menu that can be pulled into multiple pages, one that can change menu button imageurls (for up and down pressed buttons) and one that can access the page its pulled into or be given two values. (person type and person) Here what I have so far: Create a control, either static or dynamic, something like below then use the page name to determine if the button should be pressed down
Dim PageName As String = HttpContext.Current.Request.Path.ToString If PageName.Contains("Person_View") Then GoPerson_View.ImageUrl = "~/images/buttons/Person_View_Down.jpg" Else GoPerson_View.ImageUrl = "~/images/buttons/Person_View.jpg" End If
then i just need to assign the navigation propertiesGoPerson_View.NavigateUrl = "~/Person_View.aspx?pid=" & PersonSelect.SelectedValue & "&fid=" & PersonTypeSelect.SelectedValue
The issue being, without this code being on every page, and the controls too, i cannot get it to update properly if the personselect and persontypeselect values change (these are a list box and drop down list on each page). this is becoming a major task to update each time a new page is being added. How do i get all this code into a central location. -- modified at 14:03 Monday 21st August, 2006 -
ASCX files and variablescan anyone explain to me how I can do the following and how it works. I have a listbox on a page. I also have a control (menu.ascx) that changes a querystring variable on the navigateurl property according to the selected value of that list box. On the pages first load this all works fine, however, when you change the value of the list box it does not update the button. I presume this is something to do with th order of events e.t.c but surely there is a good way to access parent controls values. This seems like something lots of people would want to do. Example: Lisbox: value is 1 name is Bob Mybutton1.NavigateURL = "~/myfiles/showperson.aspx?id=" & The passed variable here
-
Dynamically Create Linkbuttonwell, you learn something new every day.... Thanks, its working now i have moved the code to load every time the page does. It means extra database hits but the trade off is worth it.
-
Dynamically Create LinkbuttonI am dynamically creating a load of link buttons and adding them to the page as below
MyLB = New LinkButton MyLB.ID = "ObliLinkButton" & MyReader("ObligationID") MyLB.CommandArgument = MyReader("ObligationID") MyLB.CommandName = "DeleteMe" AddHandler MyLB.Command, AddressOf Me.DeleteBtn_Click MyLB.Text = "Delete" Obligationslbl.Controls.Add(MyLB)
The buttons all render as they should but when i click them they dont fire the code belowProtected Sub DeleteBtn_Click(ByVal s As Object, ByVal e As CommandEventArgs) Dim MyRecords As String = e.CommandArgument.ToString Response.Write("TheRecordIs" & MyRecords) End Sub