Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Cannot convert value of parameter?Cannot convert value of parameter?
Previous
 
Next
New Post
8/13/2007 7:23 PM
 

I think I see what is going on.

By making CheckBox a BOOLEAN value, you have confused many people trying to help. :)

I don't know if you tried it or not yet, but try

GetNull(ModuleNameInfo.CheckBox)

or ModuleNameInfo.Checkbox

With CHECKBOX being a boolean value, and not a checkbox control, tostring won't convert to a boolean, and the other attempts, like .Checked is what would be used for a checkbox control.

Hope that helps.

 
New Post
8/13/2007 7:28 PM
 

Let's get all the confusion out of the picture. Let me state the facts and correct me where I am wrong:

1. You have a chekbox on a page somewhere.

2. You have a property in ModuleNameInfo class called Checkbox

3. You want to save the state of checkbox control to teh DB.

Here is how to do that:

1. In your ModuleNameView.acsx.vb (or whatever you called the file where checkbox control is on) file in button Save method (or whatever routine that runs to insert a record into DB) set ModuleNameInfo.Checkbox = yourCheckboxControl.Checked (this is a boolean value that reflects a state of checkbox control).

2. In ModuleNameController.vb, do NOT use GetNull(ModuleNameInfo.Checkbox) but simply state ModuleNameInfo.Checkbox - this is already a Boolean value set to ether False or True.

This is all there is to it.


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post
8/13/2007 9:05 PM
 



I like your guys style. Something I can work with. 
Here's the feedback:
Looks like I alredy have setup, yet I still get an error.

I am running the ModuleNameInfo.Checkbox within the controller.vb, as suggested by you & Baatezu.
This is the error I still recieve:

A critical error has occurred.
Cannot convert value of parameter 'Checkbox' from 'System.String' to 'System.Boolean'

Perhaps it is #1B (of second part) that I am mis-understanding.
If you are refering to the datasource which contains all the insert, delete, update, and controller information,
then putting ModuleNameInfo.Checkbox = yourCheckboxControl.Checked throws errors.

Where is this ModuleNameInfo.Checkbox = yourCheckboxControl.Checked tag supposed to go?
I have already tried inputing this within asp:checkbox tags as well as datasource.

Regarding 2B, Within the controller.vb I also tried ModuleNameInfo.Checkbox & (ModuleNameInfo.Checkbox)
Threw errors.


What am I still overlooking?


-machina12

 
New Post
8/13/2007 10:32 PM
 

If you are still getting that error, I'd suggest double checking the code to make sure that it was changed everywhere

SInce Checkbox is a boolean, and you are getting a String -> Bool error, there is probably somewhere else that you have a ModuleNameInfo.Checkbox.ToString() set up.

I'd just do a quick Find for "Checkbox.ToString" (minus quotes) and see if that is anywhere else in those files.

 

[quote]

Where is this ModuleNameInfo.Checkbox = yourCheckboxControl.Checked tag supposed to go?

[/quote]

That would probably go in the function where you fill your ModuleNameInfo object.

 

I hope that help.

 
New Post
8/14/2007 10:48 AM
 



So close to putting this one to rest.
Checkbox.ToString & ToString alone are not located within any of my files.

It seems like this ModuleNameInfo.Checkbox = yourCheckboxControl.Checked is what I am missing. Vitkoz states that it should be placed within .ascx.
Therefore I am guessing it should be located within DataSource tags.  Here is what I have for DataSource:

asp:ObjectDataSource ID="ObjectDataSource_ModuleName" runat="server" DataObjectTypeName="YourCompany.Modules.ModuleName.ModuleNameInfo"="ModuleName_Delete" InsertMethod="ModuleName_Insert" OldValuesParameterFormatString="original_{0}"="Page_Load" SelectMethod="ModuleName_SelectAll" TypeName="YourCompany.Modules.ModuleName.ModuleNameController" UpdateMethod="ModuleName_Update">

I have already tried injecting code within DataSource, but doesn't seem to work:
YourCompany.Modules.ModuleName.ModuleNameInfo="YourCompany.Modules.ModuleName.ModuleNameController.Checked"

Where is this ModuleNameInfo.Checkbox = yourCheckboxControl.Checked tag supposed to go?
The only other factor could be the info.vb
Shouldn't a boolean be setup like this?

' <summary> 
' Gets and sets the Checkbox Value
' </summary> 
 Public Property Checkbox() As Boolean 
Get
Return _CheckboxEnd Get 
_Checkbox = value
Set(ByVal value As Boolean)End Set 
End Property 
End
Class


-machina12

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Cannot convert value of parameter?Cannot convert value of parameter?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out