|
Hi
I am trying to put ValidationGroup for RequiredFieldValidator in asp.net 2.0 using Javascript method dynamically when ChckBox is checked.
It's working but not affecting.
please find code written bellow:
<script language="javascript" type="text/javascript">
function fun()
{
//rfvReasonForRefundH.ValidationGroup = "NoGroup";
//submit
document.getElementById('<%=rfvReasonForRefundF.ClientID %>').ValidationGroup = "submit";
}
</script>
TextBox with RequiredFieldValidator:
<asp:TextBox ID="txtReasonForRefundF" Columns="25" Rows="2" TextMode="multiLine"
runat="server"></asp:TextBox>
(Multiline textbox)<span style="color:Red">*</span>
<asp:RequiredFieldValidator ID="rfvReasonForRefundF" runat="server" ControlToValidate="txtReasonForRefundF"
Display="None" ErrorMessage="Enter Reason for Refund for Flight" SetFocusOnError="True"></asp:RequiredFieldValidator>
SubmitButton:
<asp:Button ID="btnSubmit" ValidationGroup="submit" Text="Submit" runat="server" OnClick="btnSubmit_Click"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="true"
ShowSummary="false" ValidationGroup="submit" />
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Hi
Plz remove the property Display="None" from the RequiredFieldValidator control
Regards
Joe
|
|
|
|
|
Ex:I have webpage on that i am loading grid with few records from sqlserver.i want to scroll this grid in a small panel or div .with time delay means the row should stable for 5 sec and starts scroll again stop for 5 sec for every row .
can any one send the related links or code.
|
|
|
|
|
Vignesh Krishnan wrote: I have webpage on that i am loading grid with few records from sqlserver.i want to scroll this grid in a small panel or div .with time delay means the row should stable for 5 sec and starts scroll again stop for 5 sec for every row .
Just put the GridView inside Marquee Tag. It will Scroll . You can Change the Scroll Speed by setting Marquee's property like Scroll amount, Scroll Delay etc.
|
|
|
|
|
Hello Experts,
I have a gridview on a web page.I have set the data format of all columns that consist date data as {0:dd/MM/yyyy}. I have also configured my sqlcommand string as:
set dateformat DMY
But update operation still works as Month/Day/Year format.
I have tried many things but could not solve the problem.
Please Help
|
|
|
|
|
can you please put the line of code ?
|
|
|
|
|
Hello Experts,
I want to retrieve cell values from a gridview data row.There are unbound and bound columns in a row.I can retrieve values for bound columns but cannot get it for unbound columns. My code is like below:
protected void Button1_Click(object sender, EventArgs e)
{
GridViewRow objRow = GridView1.SelectedRow;
TextBox2.Text = objRow.Cells[41].Text; //bound column
TextBox3.Text = objRow.Cells[42].Text; //!!!!unbound column!!!!
}
Please help.What is wrong?
|
|
|
|
|
Do you have Visual Studio?
Why not view your gridview row in the quick watch window and check the properties of the unbound column until you find your text...
I didn't get any requirements for the signature
|
|
|
|
|
Thank you for your reply.Of course I did it...And the result is ""
|
|
|
|
|
But there is text on the screen? Perhaps the test is stored in a different property.
An easy solution is to create a template column. Add a label. Set the text of the label. Use gridviewrow.findcontrol("labelId") to get the label and its text property.
I didn't get any requirements for the signature
|
|
|
|
|
Hi Frends
I am using the ASP.Net FileUpload control to upload the file and using AjaxMethod to save the file on Server but I am getting the FileUpload as null......
anybody pls help....
[Ajax.AjaxMethod()]
public bool VerifyUploadedData()
{
try
{
if (FileUpload1.HasFile)
{
sFileType = System.IO.Path.GetExtension(FileUpload1.FileName);
sFileType = sFileType.ToLower();
if (sFileType == ".xls")
{
string FilePath= System.Configuration.ConfigurationManager.AppSettings["FilePath"].ToString();
FilePath = FilePath + FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath(FilePath));
}
}
Thanks
Dinesh Sharma
|
|
|
|
|
Hi Friendz...
I have a exe to be executed (Windows form to be opened) when user clicks on link button on asp.net page.
I placed the exe on the server and given the path in web.config file. path is accessed in application from web.config file.
I am using the following code to run the exe from asp.net:
string path = <path from="" web.config=""> for ex: "C:\X\pay.exe"
Process.Start(path);
This is working fine on my local machine. But after deploying the application on the server, it is not calling exe and not giving any exceptions/errors. I also placed the exe on the server.
Please let me know if there is any way to get rid off this problem.
Thank you,
Raheem MA
|
|
|
|
|
It will try and run the exe on the server, 'cause it's server side code - not on the client...
|
|
|
|
|
You're fundamentally lacking knowledge of how ASP.NET runs. All code in your code behind is run on the server. While you're developing your machine is essentially the server so the exe will run on your machine. When deployed to a web server, the exe will open on the server (assuming it had permission, which it usually wont in a live environment).
Your only option is to allow the user to download the exe, and let them decide to run it. You, after all, cannot expect to dictate to the user what they should run from a webpage - imagine the security implications.
|
|
|
|
|
Good Afternoon All
In all my Application, i used to write my login screen and i will not have a problem. i have inherited the ASP.NET Application that uses a login control.
Below are the pics of how it looks
here is a code for Forget Password link
protected void btnForgot_Click(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
PasswordRecovery1.Focus();
multiviewLogin.ActiveViewIndex = 1;
if (Login1.UserName != "")
{
PasswordRecovery1.UserName = Login1.UserName;
}
}
}
and for Change Password code
protected void btnChangePassword_Click(object sender, EventArgs e)
{
ChangePassword1.Visible = true;
if (Login1.UserName != "")
{
PasswordRecovery1.UserName = Login1.UserName;
}
}
Now my Problem is that when a user enters a username and password that are correct, and Click the "Forgot Password" button , it logged teh user in the system. It is doing the same thing as the "Change Password". But if i Crear the Username and Password textbox in the Login control it goes to the right place. So i have tried to crear them when the "Forgot Password Button is clicked and set them to empty strings, well for username its working, but for password i get an error that says the property is a Readonly
i tried to do them like this
if (!Page.IsPostBack)
{
if (Login1.UserName != "")
{
Login1.UserName = "";
Login1.Password = "";
}
PasswordRecovery1.Focus();
multiviewLogin.ActiveViewIndex = 1;
if (Login1.UserName != "")
{
PasswordRecovery1.UserName = Login1.UserName;
}
http://www.vbforums.com/attachment.php?attachmentid=69035&stc=1&d=1234438104[^]
What is the Problem
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Hello Friends,
I'm playing video(s) in my web site. The details of the videos are stored in a XML file and the information are displayed in the gridview. There is play button in each row and as i click on the play button a video of that row is played. But there is problem is IE its caching the videos and playing the same video even i click on other video button. Its working fine in Flock and Mozilla.....so suggest the way to come out of that problem
|
|
|
|
|
Hai i am having a problem in sending a mail using asp.net in C#.It always showing error. So i need you to guide, how to send email from localhost using C# and please send coding to this id shankarganesh.mca@gmail.com
|
|
|
|
|
using System.Web.Mail;
protected MailMessage MMsg;
MMsg = new MailMessage();
under button click event write the below
MMsg.From = txtFrom.Text;
MMsg.To = txtTo.Text;
MMsg.Subject = txtSub.Text;
MMsg.Body = txtDesc.Text;
MMsg.Priority = MailPriority.High;
SmtpMail.SmtpServer = "";(Here u have to give ur server IP)
SmtpMail.Send(MMsg);
|
|
|
|
|
I've one crystal report of asp.net 2.0 and code behind c#.
I can open the report well. But If I click the next page symbol, It is going from 1st page to 2nd page. If I click again the next page, It is not moving to 3rd page. My page is refreshing and showing the same 2nd page.
If I click the last page symbol, It is moving to last page. And then I click the previous page, It is moving to 2nd page. But my report has 110 pages.
What the problem will be?.
More over, If I enter 3 in the provided box and click "Go To" option, it is moving to 3rd page. As well as, whatever pages I want, I could enter the number in the box and then I could move. I dont know why I could not move from 2nd page to 3rd page by using the Visual Studio 2005 provided option in the report. Anything idea pls.
Balasubramanian K.
|
|
|
|
|
Hello,
How do i remove the new line from:
<a href='<%#Stire.aspx?id=" + DataBinder.Eval(Container.DataItem,"id")%>'>> <"<%#DataBinder.Eval(Container.DataItem, "Nume")%>"> </a>
Any ideas?
|
|
|
|
|
How come id / name has new line char ?
and why you are using asp.net like classic asp ?
just use code behind
i.e.
HyperLink1.Target = Stire.aspx?id=" + DataBinder.Eval(Container.DataItem,"id");
HyperLink1.Text = DataBinder.Eval(Container.DataItem, "Nume");
if you want to remove the newline then read those values in to string varialble.
i.e.
string value1 = DataBinder.Eval(Container.DataItem,"id");
value1 = value1.Replace("\n\r",""); (or "\r\n" )
and then use value1
|
|
|
|
|
Hello friends,
i am new to asp.net,
i need to read ,write(update) a text file from the asp.net page with C#,
i started with system.IO and stream reader, writer
i know i have to do find the path and show the details in to page,
and write the content from page and save it to the file..
but couldnot move further...
could you please help
self confidence+hard work=SUCCESS
|
|
|
|
|
MS Lee wrote: self confidence+hard work=SUCCESS
'No Self confidence' + 'Others doing your job'= 'FAILURE'
Try it first, google the problem, try the solutions, and if you don`t get it, post your code here. It is only then you might learn and understand it better.
Man learns from his failures and not success.
When you fail to plan, you are planning to fail.
|
|
|
|
|
1) why to create proxy for WCF service. what is diffrence between
adding by rightclick->Add Service reference
& creating proxy.
2) why to create XSD files while making WCF service. And why to generate class frm that.
modified on Thursday, February 12, 2009 5:53 AM
|
|
|
|
|
Hello,
i add the following tags in web.config file in my project to set the session to 200 minutes
<sessionstate mode="InProc" cookieless="false" timeout="200" />
but the session is lost in some minutes,i 'm using system file project so i don't need to set session in IIS is the web.config enough to set session duration.
Thank you for answer
modified on Thursday, February 12, 2009 4:46 AM
|
|
|
|