|
The only thing is that you have to put two dates, like workdays (01-Jan-2007, 31-Jan-2007). I tried using a number for the second value and it bombed out.
______________________
stuff + cats = awesome
|
|
|
|
|
leckey wrote: The only thing is that you have to put two dates, like workdays (01-Jan-2007, 31-Jan-2007). I tried using a number for the second value and it bombed out.
Actually no, the second parameter _is_ a number, by definition of the Workday function. A negative integer gives a past date, and a positive one a future date.
What probably happened was that the cell was not formatted as a date. Did you try "Format Cells - Date"?
Hope this helps.
|
|
|
|
|
exstis a free sirte offer complete gui to use in visual basic.
Tks.
|
|
|
|
|
What?? You want some web site that offers a complete GUI for any application?? That's not possible. I think you're talking about graphics skins, changing the look of the application??
|
|
|
|
|
Please Help with VB.NET!
I have a datagrid, and it has ButtonColumn . I have the function ItemCreated for this Button. I want to pass the value of the cell of that row in the datagrid to clientside javascript. I want to confirm the user with the information of the row before they delete that row. It seems like the Javacript of the "onclick" event always fired before the ItemCreated event, that is why i can not get the the value of the row at all. I've tried many different way but i could not get it. Please help me with this. I really appreciate your help very much.
Sub dgProgram_ItemCreated(ByVal sender As Object, ByVal e As DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
Dim lbl As New Label
lbl = CType(e.Item.FindControl("lblProgram"), Label)
//program is a hidden field
Me.program.Value = CType(lbl.Text, String)
Dim btn As Button
btn = CType(e.Item.Cells(14).Controls(0), Button)
btn.Attributes.Add("onclick", "return deleteconfirm(program)")
End If
End Sub
function deleteconfirm(v)
{
return confirm('Are you sure to delete this program: '+ v.value);
}
|
|
|
|
|
This question belongs in the ASP.NET forum[^]. It really has nothing to do with VB.NET itself. It's more along the lines of ASp.NET technology.
|
|
|
|
|
He's already asked it there already.
______________________
stuff + cats = awesome
|
|
|
|
|
I don't have a direct answer to your problem but we solved exactly the same problem by using ASP.NET AJAX, GridView with a Template Cell that contains a Button and a ConfirmationExtender - really simple this way.
Maybe you want to take a look at http://ajax.asp.net
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
I have a VB Script that can lookup a record in an Access database and return values of other fields if it finds a matching record. I would like to mofify it to do the same thing for a MySQL database. Any ideas?
Code Below:
Dim connectionString
Dim clientname
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Kyocera Stuff\SFKYO FOLDERS\SFKYO\Clients.mdb;Persist Security Info=False"
function Initialize(UserName, EmailAddress)
end function
function InitializeField(fieldName, fieldValue)
If fieldName = "Client Name" then
InitializeField = clientname
exit function
end if
InitializeField = ""
end function
function GetRecordSet(clientnumber)
Dim rs
Dim conn
set conn=CreateObject("ADODB.Connection")
conn.ConnectionString = connectionString
conn.Open
set rs =CreateObject("ADODB.Recordset")
rs.Open "select * from Clients where [Client Number]='" + clientnumber + "'", conn
set GetRecordSet = rs
set rs = Nothing
set conn = Nothing
end function
function ValidateField(fieldName, fieldValue)
Dim rs
If fieldName = "Client Number" then
set rs = GetRecordSet(fieldValue)
If rs.EOF then
ValidateField = "Client number " + fieldValue + " not found"
exit function
end if
rs.MoveFirst
clientname = rs.Fields("Client Name").Value
ValidateField = ""
exit function
end if
ValidateField = ""
end function
'MsgBox ValidateField("Client Number", "RAGE7765")
Vichammer
|
|
|
|
|
|
Hi,
I am working with VB.NET on .NET 1.1, and I am not too familiar with it.
When I add a drop down list to the .aspx page, it creates the following code in the page behind:
Protected WithEvents ddlID As System.Web.UI.WebControls.DropDownList
Now I want to go and populate this drop down in a method like this:
ddlID = Me.CreateDropDownListForFileFields(columns)
columns are the columns from a dataset and the function CreateDropDownListForFileFields creates items for all the columns and returns a drop down list.
..but ddlID does not display anything. Why is this?
Please can some help?
Regards
ma se
|
|
|
|
|
u have to specify the datasource, do databind, specify datavalue and datatext field
ddlist.DataSource = dataset1.Tables(0)
ddlist.DataBind()
ddlist.DataValueField = "column name"
ddlist.DataTextField = "column name"
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
You don't understand!!
I have the following piece of code:
Protected WithEvents ddlID As System.Web.UI.WebControls.DropDownList
In a method where I try to populate this drop down list:
ddlID = Me.CreateDropDownListForFileFields(columns)
CreateDropDownListForFileFields looks like this:
Private Function CreateDropDownListForFileFields(ByVal columns As DataColumnCollection) As DropDownList
Dim ddl As New DropDownList
Dim column As DataColumn
For Each column In columns
ddl.Items.Add(New ListItem(column.ColumnName, column.ColumnName))
Next
ddl.Items.Insert(0, New ListItem("Please select...", String.Empty))
' Return
Return ddl
End Function
Please see if you can help me know.
Regards
ma se
|
|
|
|
|
This question really should have been asked in the ASP.NET forum, reguardless of the language you used.
But, in Windows Forms, any control must be added to the form's Controls collection. I'm guessing that the same is true for an ASP.NET Form.
Me.Controls.Add(ddl)
|
|
|
|
|
Hi
How to read the email address from the inbox folder of outlook into vb.net?
am using .net1.1 version.Please guide me in solving this query.
Thanks
Aruna
|
|
|
|
|
What email address?? An inbox doesn't have one.
Are you talking about the email address your customer is using to send/receive email? Or are you talking about getting the source email address of a message in the inbox?
|
|
|
|
|
Hi
I need the sender email addresses from the inbox of outlook in vb.net.
|
|
|
|
|
With Outlook Express, you'd have to use the MAPI API to do it. With the full Outlook client, you'd have to use the Outlook object model. Which is it?
|
|
|
|
|
how can i get complete system information through VB / VB.NET
Regards
Raj Mohan
|
|
|
|
|
Define complete.
You can access:
System.Management, for WMI.
WMI has a lot of info in it.
System.Environment, for general local machine stuff.
System.DirectoryServices, for active directory.
|
|
|
|
|
Hi, you can use the Process class to execute file
C:\Program Files\Common Files\Microsoft Shared\MSInfo\msinfo32.exe
You would need a lot of code it you wanted to obtain most of that information
into your program's variables.
|
|
|
|
|
You can also use the shell function call the "dxdiag" command
just use
shell("dxdiag")
it will open a window with all system information
or use
my.computer.BLAHBLAH
namespace and get the system information
hope it will help
-regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
he tell me there is an error on the insert statement
and iam sure from the names of the feilds coz i copy it from database
so what's wrong???
i don't know where is the error plz anyone answer me
thanks
cmd.Connection.Close()
If cn.State = ConnectionState.Closed Then
If cn.State = ConnectionState.Closed Then
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ehab.mdb"
cn.Open()
End If
cmd.Connection = cn
cmd.CommandType = CommandType.Text
End If
Dim s As String
Dim h As Integer
s = 0
h = 0
Dim f1, f2, f3, f4, f5, f6, f7, f8 As String
f1 = "'" & DateTimePicker1.Value & "',"
f2 = "'" & ComboBox1.Text & "',"
f3 = "'" & ComboBox2.Text & "',"
f4 = "'" & TextBox1.Text & "',"
f5 = "'" & TextBox2.Text & "',"
f6 = "'" & TextBox3.Text & "',"
f7 = "'" & TextBox4.Text & "',"
f8 = "'" & Label10.Text & "'"
s = "insert into sale "
s = s & " (dte,op,value,nos,cost,coms,nii,npp )values "
s = s & "(" & f1 & f2 & f3 & f4 & f5 & f6 & f7 & f8 & ")"
cmd.CommandText = s
h = cmd.ExecuteNonQuery()
MsgBox("Saved succssefuly")
|
|
|
|
|
On the line:
s = s & "(" & f1 & f2 & f3 & f4 & f5 & f6 & f7 & f8 & ")"
You need to seperate the values with commas
s = s & "(" & f1 & "," & f2 & "," & f3 & "," & f4 ... etc
I would recommend using Stored procs though as you are performing no validation and are wide open to injection attacks
|
|
|
|
|
Hi,
I think he had given it. He assign values in those variables along with ',' also.
I cant find an error.
Thank you.
|
|
|
|