I have a webPage.aspx as -
Now,
in aspx.cs code on button click - I have
btn_click
{
if(txt_stud_ID.Lenght > 0 && txt_FName.Lenght > 0 && txt_LName.Lenght > 0)
{
// Insert
}
else
{
div_errormsg.Innertext = "Enter proper values";
}
}
--------
Now, I want that - If Stud_ID is not there, then the "div_errormsg" must be below the Stud_ID text box.
If the FName is not there , then the "div_errormsg" must be below the FName text box.
---
How to align this div from code-behind user the textbox controls ??
Manoj BhoirPosted May 7, 2015, 12:32 PM
Check this link it will give you an idea about web forms validation. also whatever logic you are asking to align div i have used in this plugin :
jQuery Validation Plugin to Validate Web Forms
http://www.c-sharpcorner.com/UploadFile/0cefc4/jquery-validation-plugin/
Vincent Maverick DuranoPosted May 7, 2015, 8:16 AM
Adding to that, if you are concerned about the size of your page then you might consider redesigning your page. Displaying 8 GridViews alone in a single page is already a pain and probably not friendly to the user.
Riddhi ValechaPosted May 7, 2015, 3:50 AM
If the number of controls increases in a webpage.. then the page becomes heavy naa...
So.... and in this one web page.... there are 30 server side controls... out of which 7 are hidden fields...
This is not my proj....I have to improve it...
7 - hidden fields..
8 - gridviews ...
etc... rest not counted !
Vincent Maverick DuranoPosted May 6, 2015, 9:42 AM