|
i want to implement an ASP.net web apllication, when i change the dropdown list i want to textbox text change by itsself
i have a event on the dropdown box which is selectedindexchanged
code is
Select Case Me.DropDownList1.SelectedItem.Text.ToUpper
Case "TODAY"
Me.TextBox1.Text = Now.Date & " 06:00:00 AM"
Me.TextBox2.Text = Now.Date.AddDays(1) & " 05:59:59 AM"
Case "YESTERDAY"
Me.TextBox1.Text = Now.Date.AddDays(2) & " 05:59:59 AM"
Me.TextBox2.Text = Now.Date & " 06:00:00 AM"
End Select
but it is not working even this event is not fired
I am Entry level person
|
|
|
|
|
Your TextBox text MUST be changing, it must be getting set again somewhere. Given that the prerender is the only event that fires after this, is there any code in there to set the text ?
That's assuming that you've stepped through and these case statements are working ( i.e. one is being caught every time ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
make sure that the dropdown box has the AutoPostback Property set to true
/jason
-- modified at 1:33 Wednesday 23rd November, 2005
[edit]
do this by going to the design view of the Form, viewing the properties of the selected the DropDown box and setting the property there
[/edit]
|
|
|
|
|
I want to format a column so that all the cells in that column are percentage. Instead of doing this manually (highlight a column, right=click and select Format Cells..., and then change the Category to Percentage) I want to do it programmatically.
Here is an example of how I did some formatting”
'WORD WRAP
oWorkSheet.Cells.WrapText = True
'BOLD COLUMN HEADERS
oWorkSheet.Range("A1", "CC1").Font.Bold() = True
'COLUMN WIDTH
oWorkSheet.Columns(1).columnWidth() = 16.5
Thanks
|
|
|
|
|
How does this work for you?
Columns("A").NumberFormat = "0.00%"
I've always found that if I have to do some VBA, then I create and record a new macro, do what I want, then edit the macro to find out how Excel creates the code.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
The following routine, which successfully "splits" the desired search string into two parts, works to give me the proper results from my database in my datagrid:
= = = = =
Sub Page_Load(sender As Object, e As EventArgs)
Dim strName, strLastName, strFirstName, strIdNmbr as String
if not page.isPostBack() then
strSearch = SESSION("search") 'e.g., "Typ1 Typ2"
Dim strCriteria01, strCriteria02 As String
'Dim strString03 as String
Dim intPos As Integer
If Len(strSearch) > 0 Then
intPos = InStr(strSearch, " ")
If intPos > 0 Then
'Retrieve Criteria Info
strCriteria01 = Left(strSearch, intPos - 1)
'Retrieve win_option
strCriteria02 = Mid(strSearch, intPos + 1)
strString03 = "'" & strCriteria01 & "', '" & strCriteria02 & "'"
End If
End If
strLastName = UCase(TRIM(Request("LastName")))
strFirstName = UCase(TRIM(Request("FirstName")))
strIdNmbr = TRIM(Request("IdNmbr"))
strName = strLastName & "%" & strFirstName & "%" & strIdNmbr & "%"
strName = Replace(strName, "%%", "%")
strName = Replace(strName, "%%", "%")
strSql = "select /*+ FIRST_ROWS */ node_id, name " & _
" from doc_node d" & _
" where " & _
" name like '" & strName & "' and node_type = 'folder'" & _
" and exists (select 1 from doc_node c where c.grp_cd IN (" & strString03 & ") " & _
" and c.parent_node_id = d.node_id)"
end if
BindGrid (CreateDataSource())
End Sub
Sub Page_Unload(sender As Object, e As EventArgs)
'con = nothing
End Sub
= = = = =
But I also need to get the value of variable strString03 into the hyperlink text in the datagrid. In my datagrid, if I use, say:
[ItemTemplate]
[asp:HyperLink runat="server" NavigateUrl= '[%# "docs.aspx?NAME=" + etc., etc... %]' Text='See Details' ]
[/asp:HyperLink]
[/ItemTemplate]
I can click on each occurance of "See Details" and it links through perfectly to the various results I want to see. But now I need to get the value of strString03 (e.g., Typ1 or Typ2) to display as the Text for the HyperLink instead of just displaying the words 'See Details'. I need to do something like:
[ItemTemplate]
[asp:HyperLink runat="server" NavigateUrl= '[%# "docs.aspx?NAME=" + etc., etc... %]' Text=[%# "actual.value.of.strString03 %]' ]
[/asp:HyperLink]
[/ItemTemplate]
Or whatever needs to be done in order to display the link text I want.
Anyone??
Thanks much!!!
|
|
|
|
|
Hi, I have a problem validating with a XmlValidatingReader and a .xsd file
the validation breaks when the importDate attribute is parsed
< Info importDate = "1967-08-13" />
in the .xsd is defined as
< xs:attribute name="importDate" type="xs:date" use="required" />
and the error message is
"The 'importDate' attribute has an invalid value accordint to its data type. An error occurred at, (12, 44)"
Anyone has an idea why this happens, when I validate the same XML file in the XMLSpy it works fine, then i run my program and it breaks in that line, if I remove the line then everything works
Thanks in Advance
Isaac B
|
|
|
|
|
Is there a way to test for a cache object?
in one part of my code i have
If (IsNothing(cache.Item("UserTypes"))) Or (IsNothing(cache.Item("States")) Or (IsNothing(cache.Item("Countries")))) Then
'
GenericProcedure = "Admin_SelectProfessionalInformation_ForCache"
Else
'
GenericProcedure = "Admin_SelectProfessionalInformation"
End If
==================================================
But i keep getting an error because there is not a cache object by the name (key) of "UserTypes"
I would like to test to see if this key is in the cache and if NOT then user the correct StoredProcedure...
and if IT IS in the cache us the correct StoredProcedure...
thanks alot ahead of time!
erik
|
|
|
|
|
I'm trying to write a service that uses this class so I can have the server auto send update emails on a daily basis. When I try to import this class, it's not available as it would normally be in an asp.net or vb.net project. Is there something I'm doing wrong, or is this just not available from within a windows service?
Thanks-
|
|
|
|
|
Did you set a Reference to the System.Web.dll?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That worked. I guess a reference to that is set automatically in other types of projects, but not a service.
Thanks-
|
|
|
|
|
Hi,
Who can I send email with an attachment?
This is the code witchh I use but it don't work. Something missing?
Dim oMsg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
oMsg.From = "noone@nobody.com"
oMsg.To = "someone@somewhere.com"
oMsg.Subject = "Email with Attachment Demo"
oMsg.Body = "This is the main body of the email"
Dim oAttch As MailAttachment = New MailAttachment("C:\myattachment.zip")
oMsg.Attachments.Add(oAttch)
SmtpMail.Send(oMsg)
Please help me!
Thanx anyway.
|
|
|
|
|
If you intend to send many e-mails and with more functionality than is included in .NET framework, you should look at the Indy project .
Regards,
Tadej
|
|
|
|
|
You didn't set the smtp sever property.
What error are you getting?
"People who never make mistakes, never do anything."
My Blog
|
|
|
|
|
I am trying to run a vb6 compiled program on a public drive of a network. The program need access to a data base and when the dataenvironement (yes old but this is how I learnt to do things!) attemps to open the programme throws up this error and crashes.
HOWEVER it only does this when other users on the network attemt to run the file, when I do everything is fine. I have Network Manager privilages on the network and perhaps this is the reason.
Is there anyway I can get rid of this bug?
Thanks
°[Halo]°
Project Basilisk
|
|
|
|
|
713 is "Class not registered". Your VB6 app is using a COM class that exists on your machine, but on the machines of the other people trying to run your application. These other people would have to install the missing .DLL's or .OCX's that your app requires.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is not the problem though because if I run the programme on the machines under my own username then it works fine confused:
°[Halo]°
Project Basilisk
|
|
|
|
|
Assuming your trying to connect to an Access database, it would appear that the database your trying to connect to is only visible under your account. Check to make sure that the normal users can see the .MDB file your trying to open.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have a crystal report which has the box object with rounded corners. When i try to view it through the Crystal Report Viewer using VB.Net, the text disappears in the box object.
But if i remove the rounding, everything looks fine.Searched google and came to know this is a bug in .NET and was asked to install service pack. But i am not clear which service pack solves this issue as i have the latest one installed on my machine.
Please help if you know anything abt this.
Thanks
|
|
|
|
|
if i want to get the type of file and myfilename are returned in string variable how can i get type of file.Someone please help me out.
Raheel Iqbal
|
|
|
|
|
????
What's the type of a file?
|
|
|
|
|
it can be (.doc,.pdf,.xls,ppt etc...)
Raheel Iqbal
|
|
|
|
|
That's the extension of the file.
Anyway what you're looking for is provided directly by one of the FW classes specifically this method:
System.Io.Path.GetExtension
For full details have a look at this reference in the Help.
-- modified at 6:14 Tuesday 22nd November, 2005
|
|
|
|
|
Thank you very much your response working. thanks alot
Raheel Iqbal
|
|
|
|
|
Hello to all of you. Many of you reading this message helped me a lot of times. So you all know I'm pretty much a beginner in C++. However, I try to do my best to help everybody with what I know. Some time a go I promised I'll make an article about linking C++ with VB, inter process communication kind of thing, even though this time it's about a DLL and an Application, it still applies to the category.
So, without further delay, I invite you all to take a look at my article, I hope you'll find one or two interesting things there. Thank you all again for being here helping people like myself.
http://www.thecodeproject.com/threads/InterProcessCommunication.asp[^]
In less than 2 months I'll also release the first public beta for the freeware application I've been working on. Many of you helped me at it and you'll all find yourselves at the "Thanks to" section, as I am not one that forgets those who helped.
A nice day (or a good night) to y'all.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|