Getting Answer of ur questioin
Ans:-multilne text box assign max length
Ans:- Validation For Multiline Textbox
<script type="text/javascript" language="javascript">
var count =
"200";
function
limiter()
{
var tex
=document.getElementById("<%=
TextBox3.ClientID %>").value;
var len
= tex.length;
if(len
> count)
{
tex = tex.substring(0,count);
document.getElementById("<%=TextBox3.ClientID %>").value
=tex;
return
false;
}
}
</script>
<asp:TextBox ID="TextBox3"
runat="server"
TextMode="MultiLine"
onKeyUp="javascript:limiter();"
></asp:TextBox>
Question 2:--When Page
directive error occurred ?
Ans:-Check
(Codebehind in source code ,cs page namespace, root name whould be same).
Qusetion 3:--How After
submit show javascript msg with textbox
name from server side.
Ans:-RegisterStartupScript(this.GetType(), "Alert",
"alert('Message stored successfully..."+TextBox1.Text+"');", true);
Question 4:-> How to make after data submitting Rediobutton
blank
Ans:-> rdlMF.Items[0].Selected = false;
rdlMF.Items[1].Selected = false;
Question 5:-> How to upload File
Ans:-> if
(FileUpload1.HasFile)
{
string
abspath=MapPath("~/NewFolder1/"+FileUpload1.FileName);
FileUpload1.SaveAs(abspath);
Label4.Text="Uploaded successfully";
}
else
{
Label4.Text = "please select File ";
if
(FileUpload1.HasFile)
{
string
abspath = MapPath("~/NewFolder1/"
+ FileUpload1.FileName);
FileUpload1.SaveAs(abspath);
Label4.Text = "upload
successfully";
}
else
{
Label4.Text = "plz select file";
}
No comments:
Post a Comment