|
No, you shouldn't need to change the code-behind.
|
|
|
|
|
Sorry for the late reply. It worked. Thank you very much.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
To solve this issue, you can set "ValidationGroup" property of each control.
Try to set MPNCPNFileUpload, MPNCPNFileUploadButton and TabFileUploadErrorCustomValidator controls "ValidationGroup" property to "2" and
DocumentFileUpload, DocumentUploadButton and DocumentUploadedCustomValidator controls "ValidationGroup" property to "3".
hope this will help you.
Regards...
Vijay Jain
|
|
|
|
|
Thanks very much. It worked.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
There is a Property called ValidationGroup.
Using this property should solve your problem.
Below is a sample:
<asp:fileupload id="MPNCPNFileUpload" runat="server" validationgroup="ValGrp1" xmlns:asp="#unknown">
<asp:button id="MPNCPNFileUploadButton" runat="server" onclick="TabFileUploadButton_Click" text="Upload" validationgroup="ValGrp1" xmlns:asp="#unknown">
<asp:customvalidator id="TabFileUploadErrorCustomValidator" runat="server" display="Dynamic" errormessage="CustomValidator" onservervalidate="TabFileUploadedCustomValidator_ServerValidate" validationgroup="ValGrp1" xmlns:asp="#unknown">
TextFile with MPN-CPN Details should be uploaded
|
|
|
|
|
Thanks to everyboyd. It got worked.. Thanks again.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
hi guys,
i try to send a mail like this:
MailMessage mailMsg = new MailMessage();<br />
mailMsg.From = new MailAddress("localhost", "Webmaster");<br />
mailMsg.To.Add(new MailAddress("localhost", "Client guy"));<br />
mailMsg.Subject = "Message Subject";<br />
mailMsg.Body = msgBody;<br />
mailMsg.IsBodyHtml = true;<br />
mailMsg.Priority = MailPriority.High;<br />
<br />
SmtpClient smtp = new SmtpClient("localhost");<br />
smtp.Send(mailMsg);
but then i get this error:
<code>The specified string is not in the form required for an e-mail address.
The smtp has already been set up from IIS. i just want to test how to send mail on my local system. how do i do this?
He who goes for revenge must first dig two graves.
|
|
|
|
|
Creamboy wrote: The specified string is not in the form required for an e-mail address.
This error means, there is something wrong with the email address you using. Make sure the email address is correct.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yusuf.A wrote: This error means, there is something wrong with the email address you using. Make sure the email address is correct.
I know that. I'm only really asking: what do i put in there to send a mail to my local server?
He who goes for revenge must first dig two graves.
|
|
|
|
|
valid email address.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Creamboy wrote: mailMsg.From = new MailAddress("localhost", "Webmaster");
mailMsg.To.Add(new MailAddress("localhost", "Client guy"));
Change "localhost" to a valid email address.
|
|
|
|
|
It's like you know nothing about ASP.NET, the internet, or basic English comprehension.....
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
MailMessage mail = new MailMessage();
mail.To.Add("demo@gmail.com");
mail.From = new System.Net.Mail.MailAddress("from@gmail.com");
mail.Subject = "Subject";
mail.Body = "hello, this is test mail";
mail.IsBodyHtml = true;
SmtpClient client = new SmtpClient(server name);
client.Credentials = new NetworkCredential("username", "password");
client.Send(mail);
Response.Write("send mail!");
|
|
|
|
|
I'm also doing the same, but the mail goes to the Queue folder only....
what to do???
|
|
|
|
|
Hi,
I am using a Dataset, In which a Date field comes, I am assigning it to a String Variable. After than I am comparing it with Calender1.Selected Date.
If CDate(Session("DispDt")) > CType(txtDespDate.Text, Date) Then
lblMsg.Text = "Dispatch Date Must be Greater than " & MasterDispDt
txtDespDate.Text = ""
Exit Sub
End If
It is giving error as
Conversion from string "31-01-2009" to type 'Date' is not valid.
Please tell me What can be done.
Ramesh Sambari
|
|
|
|
|
verify what is coming in your date variable from database??
it will give error only in the case when date string is not valid for example..
sometimes with day instead of 02 comes only 2 when we assign it to a string and datetime conversion fucntion gives error here..... try to give valid date to string.
Government Dyal Singh College Lahore.
|
|
|
|
|
To convert a string to date, the date format should be MM/DD/YYYY OR MM/DD/YY.
Check how you are retriving the date values from database.
|
|
|
|
|
Conversion of date depends on your system's date and time setting. Probably computer assumes that 31 is month and 01 is day. Problem may be resolve by interchanging their positions like 01-31-2009, but it may appear when you deploy it to another system.
To prevent this error, write your date like 31-Jan-2009, this method will never fails cause the use of month name abbreviation. This is my regular practice and I have got no error since I use it in this format. Try and best of luck.
Be a part of solution, rather then be a part of problem
|
|
|
|
|
|
Hi,
I need to config my Report Server to be used by Forms Authentication.
Microsoft has a sample that is not compatible with VS2008. (We can convert it to 2008 using VS convertor wizard, but it's config files are different)
Do you know any sample in VS2008?
Best wishes
|
|
|
|
|
I have a page, Default.aspx, and a UserControl, HelloControl.ascx. In the page, I dynamically instantiate the control as follows:
protected void Page_Load(object sender, EventArgs e)
{
HelloControl c = new HelloControl();
Response.Write(c.Greet());
}
This works fine, and the user control returns "Hello from a control", which is written to the response. I have no @Register directive in Default.aspx, but when I try a similar dynamic control creation on a client's machine, I get an error that the "Type or Namespace does not exist".
I have even gotten feedback, on forums, from MS, that I need the @Register directive, but I obviously don't. Can anyone help me out with info on how and when the user control is compiled if no @Register directive references it?
|
|
|
|
|
u have to register the usercontrol on htmlview like this on top
<@>
and then call it where u want like this:
<uc1:scmheader id="SCMHeader1" runat="server" xmlns:uc1="#unknown">
|
|
|
|
|
devesh sinha wrote: and then call it where u want like this:
<uc1:scmheader id="SCMHeader1" runat="server" xmlns:uc1="#unknown">
And how would I do that in pure C#?
|
|
|
|
|
It is nice to see you trying to help. But, you need to understand what the problem is before giving your advice.
How is your solution going to help the OP?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
@Register directive is needed for aspx pages not the code behind. You did not add the user control tag to your aspx, thus the only way to add it. either
1. as you have shown, writing to the response stream your self
2. add it to the Control collection Page.Controls.Add()
The user control gets compiled by JIT. To verify this, introduce syntax error in your HelloControl code. You will notice that at run time you will get a syntax error.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|