I created a contact form and I want to check the values for spam.
The contactus.aspx page contains a bunch of RadTextBox within an HTML table.
<telerik:RadTextBox ID="txtFirstName" Runat="server" Label="First Name:"
Skin="WebBlue" Width="200px">
</telerik:RadTextBox>
The code behind for submit
The contactus.aspx page contains a bunch of RadTextBox within an HTML table.
<telerik:RadTextBox ID="txtFirstName" Runat="server" Label="First Name:"
Skin="WebBlue" Width="200px">
</telerik:RadTextBox>
The code behind for submit
using Telerik.Web.UI
protected void btnSubmit_Click(object sender, EventArgs e)
{
//Spam check for url=
foreach(Control c in this.Controls)
{
if (c is RadTextBox)
{
// Attempting to reset the text value to test, just for testing to see if I am touching the control
(c as Telerik.Web.UI.).Text = "test";
}
}
}
Is this the right way to loop the form for RadTextBox?