or
<
telerik:RadInputManager
id
=
"RadInputManager1"
runat
=
"server"
>
<
telerik:TextBoxSetting
ErrorMessage
=
"Required field."
Validation-IsRequired
=
"True"
EmptyMessage
=
"Please type here."
Validation-ValidateOnEvent
=
"Submit"
>
<
TargetControls
>
<
telerik:TargetInput
ControlID
=
"txtFirstName"
Enabled
=
"true"
/>
<
telerik:TargetInput
ControlID
=
"txtLastName"
Enabled
=
"true"
/>
<
telerik:TargetInput
ControlID
=
"txtEmail"
Enabled
=
"true"
/>
</
TargetControls
>
<
Validation
IsRequired
=
"True"
ValidationGroup
=
"AccountValidationGroup"
>
</
Validation
>
</
telerik:TextBoxSetting
>
<
telerik:RegExpTextBoxSetting
ErrorMessage
=
"Please enter a valid email address."
ValidationExpression
=
"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
Validation-ValidateOnEvent
=
"Submit"
>
<
TargetControls
>
<
telerik:TargetInput
ControlID
=
"txtEmail"
Enabled
=
"true"
/>
</
TargetControls
>
<
Validation
IsRequired
=
"True"
ValidationGroup
=
"AccountValidationGroup"
></
Validation
>
</
telerik:RegExpTextBoxSetting
>
</
telerik:RadInputManager
>
<
div
style
=
"float: left; width: 50%;"
>
<
table
cellspacing
=
"0"
border
=
"0"
summary
=
"Edit Table"
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"lblFirstName"
runat
=
"server"
Text
=
"First Name"
/>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"txtFirstName"
runat
=
"server"
AutoCompleteType
=
"FirstName"
TabIndex
=
"3"
/>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"lblLastName"
runat
=
"server"
Text
=
"Last Name"
/>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"txtLastName"
runat
=
"server"
AutoCompleteType
=
"LastName"
TabIndex
=
"4"
/>
</
td
>
</
tr
>
<
tr
>
<
td
align
=
"right"
>
<
asp:Label
ID
=
"lblEmail"
runat
=
"server"
Text
=
"Email"
/>
</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtEmail"
runat
=
"server"
AutoCompleteType
=
"None"
TabIndex
=
"9"
></
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
asp:SqlDataSource
ID
=
"sqlGetDocs"
runat
=
"server"
OnInserting
=
"SqlGetDocs_Updating"
ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
SelectCommand="spAspGetEnrollDocs" SelectCommandType="StoredProcedure"
InsertCommand="spASPinsertClientDocDatabase"
InsertCommandType="StoredProcedure">
<
SelectParameters
>
<
asp:SessionParameter
Name
=
"SSN"
SessionField
=
"SSN"
Type
=
"String"
/>
</
SelectParameters
>
<
InsertParameters
>
<
asp:ControlParameter
ControlID
=
"DropDownList1"
Name
=
"Client"
PropertyName
=
"SelectedValue"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"SSN"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"DocDesc"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"FileType"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"ImageFile"
dbType
=
"Binary"
/>
<
asp:Parameter
Name
=
"Updated"
Type
=
"DateTime"
/>
<
asp:Parameter
Name
=
"Comments"
Type
=
"String"
/>
<
asp:ControlParameter
ControlID
=
"lblUserName"
Name
=
"UserID"
PropertyName
=
"Text"
Type
=
"String"
/>
</
InsertParameters
>
</
asp:SqlDataSource
>
Protected
Function
UpdateImageField(
ByVal
gridEditableItem
As
GridEditableItem)
As
Byte
()
Dim
bytes
As
Byte
() = (
DirectCast
(gridEditableItem.EditManager.GetColumnEditor(
"ImageFile"
), GridBinaryImageColumnEditor)).UploadedFileContent
If
bytes
Is
Nothing
OrElse
bytes.Length = 0
Then
bytes =
New
Byte
() {}
End
If
Return
bytes
End
Function
Protected
Sub
SqlGetDocs_Updating(
ByVal
sender
As
Object
,
ByVal
e
As
System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)
Dim
imageBytes
As
Byte
() = UpdateImageField(TryCast(RadGrid.EditItems(0), GridEditableItem))
e.Command.Parameters(
"@ImageFile"
).Value = imageBytes
End
Sub
Could someone tell me what I'm doing wrong?
TextBox txtGameUPC = (TextBox)editForm.FindControl("txtGameUPC");
txtGameUPC.Visible = true;
txtGameUPC.Enabled = false;
//Call Java script function to validate the UPC code
txtGameUPC.Attributes.Add("onblur", "validateUPC('" + txtGameUPC.ClientID + "');");