when I am getting the value for a texbox in gridview, It's displaying " ".
Give me the solutions.
thank u
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Sep 30, 2013, 7:21 AM
Here is the snippet.
RequiredFieldValidator RequiredFieldValidator1 = new RequiredFieldValidator();
RequiredFieldValidator1.Enabled = true;
RequiredFieldValidator1.ErrorMessage = "First field required";
RequiredFieldValidator1.Display = ValidatorDisplay.Dynamic;
RequiredFieldValidator1.ControlToValidate = txtName.Id;
this.page.Controls.Add(RequiredFieldValidator1);
RequiredFieldValidator1.Validate();
shibasankar beheraPosted Sep 30, 2013, 7:27 AM
In which event or method I have to validate the text boxes in gridview?
shibasankar beheraPosted Sep 30, 2013, 7:26 AM
I hope We'll make good contact in future.....
shibasankar beheraPosted Sep 30, 2013, 7:09 AM
Now plz tell me How to validate text boxes inside Gridview....
shibasankar beheraPosted Sep 30, 2013, 7:04 AM
shibasankar beheraPosted Sep 30, 2013, 6:42 AM
thank u for helping me.
Posted Sep 30, 2013, 6:32 AM
shibasankar beheraPosted Sep 30, 2013, 6:29 AM
I am writing something in that text box, after clicking button, I am not getting that value.
Posted Sep 30, 2013, 6:10 AM
Have you trimmed the value in the databound event before adding it to the controls collection?
Do you have any default text for the textbox control?
shibasankar beheraPosted Sep 30, 2013, 5:56 AM
still I am getting that
Posted Sep 30, 2013, 5:17 AM
You meant to say, still you're getting   in the javascript and gridview ?
shibasankar beheraPosted Sep 30, 2013, 5:09 AM
I am calling the above formula inside a button click event...
Posted Sep 30, 2013, 5:03 AM
So, I'm unclear here. Can you please explain bit more?
shibasankar beheraPosted Sep 30, 2013, 5:00 AM
This is right. But can you tell me, how to get those textbox value in gridview.
}
Its displaying " "...
Posted Sep 30, 2013, 4:52 AM
txtFName.Text = txtFName.Text.Trim();
shibasankar beheraPosted Sep 30, 2013, 4:50 AM
this is a web page...
Posted Sep 30, 2013, 4:47 AM