Hi,
the main page doesn't trigger a postback when the pospup is closed. The only postback is triggered when the popup is loaded. Or am I closing the popup incorrectly?
This is my code to close the popup:
Dim strScript As String = "<script>window.opener.document.forms(0)." + control.Value +...
I have an application with a datagrid with 'Add' buttons on each row. When the user clicks the add button a popup form listing suppliers is displayed. Once a user has selected the supplier details are sent to the database. I then want the popup to close and the main form to refresh so that the...
Thanks for your response DrSQL,
am I right in thinking my trigger will have to do a check on each date field in the table like below? I guess there is no other more efficient way of doing this?
CREATE
trigger Update_DATE_i on DATE for insert as
update tablename set date1 =Null where...
I have a large table that has many datetime fields. These fields have been entered as 01/01/1900 as default rather than as nulls. I would like to write an update trigger for when the record is updated, to update each of the date fields to be a null should the date be 01/01/1900, otherwise...
I am new to ASP.NET and am building an application with several UserControls. My problems lies when I try and set/return values from the ascx to an aspx page, I get the error: System.NullReferenceException: Object reference not set to an instance of an object
An example of my code to set the...
Firstly, I apologise for adding on the end of a post however I too am attempting to write login code to our domain. The only difference is my company doesn't use LDAP. Does anyone know of any samples/resources about the WinNT:// provider? Any help would be appreciated.
Alasdair
Better late than never!
'### To add
Dim intX As Integer
Dim strCode As String
Dim strName As String
For intX = 0 To lstListbox.Items.Count - 1
If lstPractices.Items(intX).Selected Then
'### Copy into Selected box
strCode = lstListbox.Items(intX).Value
strName =...
Try using this function:
Public Function GetDay(dteDate As Date) As String
Dim intDay As Integer
intDay = Weekday(dteDate)
Select Case intDay
Case 1
GetDay = "Sunday"
Case 2
GetDay = "Monday"
Case 3
GetDay = "Tuesday"
Case...
I wonder if anyone could let me know what are the main advantages / disadvantages of creating a UDT, for example:
Private Type myPerson
strName As String
intAge As Integer
lngHeight As Long
lngWeight As Long
End Type
over declaring these variables separately as below:
Dim...
Try this :
Private Sub Command1_Click
If txtEmail.text <> "" then
if VaildEmail(txtEmail) = True then
msgbox "Valid Email"
Else
msgbox "Email is invalid"
End if
End if
End Sub
Vec, here is a function I use to validate email addresses.
Public Function VaildEmail(txtText As TextBox) As Boolean
Dim intX As Integer '### Count Integer
Dim intY As Integer '### @ Character
Dim intZ As Integer '### . Character
Dim intW As Integer '### Count of @ Character...
Very true, I'm afraid I put this code together rather too quickly this morning and therefore they I cannot guarantee that it's totally 'bug free'. However this problem can be solved by changing the forth line to
For intY = intX To List1.ListCount - 1
Cheers
Try this, it works OK from here:
Dim intX As Integer
Dim intY As Integer
For intX = 0 To List1.ListCount
For intY = intX + 1 To List1.ListCount - 1
If StrComp(List1.List(intX), List1.List(intY), vbTextCompare) = 0 Then
List1.RemoveItem (intY)
End If
Next...
That'll be because you need to add your code to remove the duplicate entry or call a sub procedure to do this at the '### Remove Duplicate' point.
Good luck
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.