Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Equating one formview to another ?? Dynamic type code? Findcontrol?

Reply
Thread Tools

Equating one formview to another ?? Dynamic type code? Findcontrol?

 
 
jobs
Guest
Posts: n/a
 
      11-07-2006

In the below code, why can't I equate which form to a formview like we
do with controls under the main control. The below gives me an error
because whichform does not really take all the properties of the form
which I equate to it.

I know the below is not an issue when I use FindControl on a dropdown.
I tried Findcontrol, but that did not work.

Sub DatePicker(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim FormMode As String
Dim StartorEnd As String
Dim whichform As FormView
Dim FormTime As String
If sender.clientid().ToString.Contains("Rate") Then
whichform = RateFormView
Else
whichform = ChargeFormView
End If
If whichform.CurrentMode = FormViewMode.Edit Then
Formmode = "E"
Else
FormMode = "I"
End If
If sender.clientid().ToString.Contains("Start") Then
StartorEnd = "S"
FormTime = " 12:00:00 AM"
Else
StartorEnd = "E"
FormTime = " 11:59:59 PM"
End If

Dim PopUpCtrlExt As AjaxControlToolkit.PopupControlExtender =
whichform.FindControl(StartorEnd + "Popup")
Dim Cal1 As Calendar =
RateFormView.FindControl(whichform.ID.ToString.Sub string(1, 1) +
FormMode + StartorEnd + "Calendar")
PopUpCtrlExt.Commit(Cal1.SelectedDate.ToShortDateS tring +
FormTime)

End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formview within Formview Chris ASP .Net 0 05-19-2007 04:12 PM
Equating monitor size to film size question B. Peg Digital Photography 7 02-04-2004 12:26 AM
Re: How do I access another type's method from one type's method Howard C++ 2 07-04-2003 12:08 PM
Re: How do I access another type's method from one type's method Rolf Magnus C++ 1 07-04-2003 02:38 AM
Equating a String & Integer Variable Roger Lord ASP .Net 2 07-03-2003 02:21 AM



Advertisments