custome web part for sharpoint in that form the text box change event not fire

Posted by Sagarp under SharePoint on 11/20/2009 | Views : 2713 | Status : [Member] | Replies : 7
hi


i have create sharpoint web part.in this web part i have do.text box value is valid or not ,check in text box change event,but text box changed event not working reply me what i do
Thanks

sagarp

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/



Responses

Posted by: Vuyiswamb on: 11/20/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
i dont understand your problem. can you please try again



Thank you for posting at Dotnetfunda
[Administrator]

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/20/2009 [Member] Bronze

Up
0
Down
Hi sir

i have create sharpoint web part.in this web part i have do.text box value is valid or not ,check in text box change event,but text box changed event not working reply me what i do.


Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/20/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
What you mean is that you want to Validate the Textbox on textchange ?

Thank you for posting at Dotnetfunda
[Administrator]

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/20/2009 [Member] Bronze

Up
0
Down
hi sir


yes,i want to Validate the Textbox on textchange,in sharpoint webpart

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/20/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
what do you want to Validate , add a Validation Control. Do you know know the textchanged event works ? it works like this

if a user enter the value, it does not get fired. but it gets Fired when the focus is lost on that textbox. so you might be confusing it with something else.


Thank you for posting at dotnetfunda

Vuyiswa maseko

Thank you for posting at Dotnetfunda
[Administrator]

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/20/2009 [Member] Bronze

Up
0
Down
hi sir

plz reply me when focus is lost that time check user enter valid is valid or not,reply send me example,with out use validation control.only check with programmatic then reply hoe check in lost focus.

thanks
sagar

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/20/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
The Best thing to use here is the RequredField Validator

like this

<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation ="false"  CodeFile="Default.aspx.cs" Inherits="_Default" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox1" ErrorMessage="RequiredFieldValidator">Please enter Details.....</asp:RequiredFieldValidator>
<br />
<br />
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox2" ErrorMessage="RequiredFieldValidator">Please enter Details.....</asp:RequiredFieldValidator>
</div>
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
</body>
</html>


if you have a Control that will initiate postback like a button then you will see how easy it.

Thank you for posting at Dotnetfunda

Vuyiswa

Thank you for posting at Dotnetfunda
[Administrator]

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response