|
sulabh2020 wrote: ^[1-9]+[0-9]*(\.{1}[0-9]+)?
This is incorrect for the expected problem. This will fail to match 0.25 , 25.2255255555555555s . If any text characters appeared in between the number, this expression will match the number part. If won't fail when character appears in between.
|
|
|
|
|
Sonia Gupta wrote: I wanted that textbox can accept both whole numbers as well as te fractional numbers
\b[\d]+$|\A([\d]+[\.]{1}[\d]+$|[\.]{1}[\d]+$) This accepts the following patterns
17.12
.12
0.25
etc..
|
|
|
|
|
Navaneeth , i want the basic book for regular expressions.Can u please refer me any one , a very basic especially for regular expressions.U know the expression u gave, i am not being able to understand it.
If u can make me understand this term .
ThanQ
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sonia Gupta wrote: Navaneeth , i want the basic book for regular expressions.Can u please refer me any one
I don't know any good books for regular expression. You can try RegExBuddy. It's good program which helps to write regular expressions.
Sonia Gupta wrote: If u can make me understand this term .
I will try. Following is the explanation for above regular expression. I will split the above expression into small expressions, that is easy to understand.
\b[\d]+$ : This matches any digit in between 0-9 unlimited times. So matches all 12 , 1234 , 12345 etc. This won't match 125s or s584. So real number part is done. Now we need expression for fractional numbers. Bear it in mind, fractional numbers could be written in two ways, 12.32 and .32. Below is the expression which matches fractional numbers.
\A([\d]+[\.]{1}[\d]+$|[\.]{1}[\d]+$) : This contains two nested expressions for two types of fractional numbers. First one is ([\d]+[\.]{1}[\d]+$ : which matches 0.25 , 12.25 etc. This fails to match .25 , 0..25.
[\.]{1}[\d]+$) this is the second nested expression which matches any number starts with . symbol (.123,.87). These two expressions are combined using or(| ) operator. SO if first one fails, regex engine will look for a match with second one.
In the same way these two expressions are combined with the first expression using another or operator. So regex engine will look for a real number without any decimal points first. If that one fails, it will enter into the second expression. Second expression is nested, so it will look for match with the first regex, and when it fails it will move to second. If all these fails, entire expression will be failed.
\A Asserts position at the beginning
$ Asserts position at the end
Hope it helps
|
|
|
|
|
instead of \b[\d]+$ can i write [0-9]*
if yes what's the meaning of \b and \d
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sonia Gupta wrote: instead of \b[\d]+$ can i write [0-9]*
No instead of [\d]+ you can write [0-9]* . \b is asserting position at the word boundaries. \d matches any number from 0-9.
|
|
|
|
|
Hi
Can someone suggest me to access cookies in a domain. I need to achieve Single Sign On through this.
Reena.
|
|
|
|
|
Reena.E wrote: Can someone suggest me to access cookies in a domain
You can access only the cookies which are created from your domain. It's not allowed to access the cookies from different domains.
|
|
|
|
|
encrypt webconfig value of appsetting in asp.net
i am using this code but it Encrypt all Appsetting but i want encrypt only value of Appsetting.
CODE:-
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath)
Dim section As ConfigurationSection = config.GetSection("appSettings")
If Not section Is Nothing And Not section.SectionInformation.IsProtected Then
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider")
config.Save()
End If
One thing more i want if Administrator fail to modified value of Appsetting through ui then Administrator also change the value of Appsetting through manually can it passable please help me
Piyush Vardhan Singh
|
|
|
|
|
Hi Friends,
I have one doubt,in datagrid i have a button column delete and editcommandcolumn edit link button when i click edit button delete button should be disabled,when i click cancel button delete button should be enable.Can any one tell me please?....if possible tell me the coding..
Thanks & Regards
Senthil Kumar
|
|
|
|
|
Hi,
in the edit event you can find delete button and then disable it.
and same way in delete command.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
HI,
I'm trying to send an email from my web-site, and it's actually working, everything is pretty cool,
but I have this kind of exception:
Send failure: System.Web.HttpException: The "SendUsing" configuration value is invalid. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040220): The "SendUsing" configuration value is invalid. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at Register1.CreateUserWizard1_SendingMail(Object sender, MailMessageEventArgs e) in e:\web\myeconpaper\htdocs\Register.aspx.cs:line 64
The emaiol is sent, but the result label shows me exception,
WHY?
|
|
|
|
|
Repost your exception, kind of hard to follow with the scroll bar.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
here is the exception:
Send failure: System.Web.HttpException: The "SendUsing" configuration value is invalid. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040220): The "SendUsing" configuration value is invalid. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at Register1.CreateUserWizard1_SendingMail(Object sender, MailMessageEventArgs e) in e:\web\myeconpaper\htdocs\Register.aspx.cs:line 64
and here is my code:
protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e)<br />
{<br />
<br />
CreateUserWizard wizard = (CreateUserWizard)sender;<br />
MembershipUser user = Membership.GetUser(wizard.UserName);<br />
<br />
e.Message.Body = e.Message.Body.Replace("<%PasswordQuestion%>", CreateUserWizard1.Question);<br />
e.Message.Body = e.Message.Body.Replace("<%PasswordAnswer%>", CreateUserWizard1.Answer);<br />
e.Message.Body = e.Message.Body.Replace("<%DomainName%>", Request.ServerVariables["SERVER_NAME"]);<br />
e.Message.Body = e.Message.Body.Replace("<%VirtualDirectory%>", Request.ApplicationPath);<br />
e.Message.Body = e.Message.Body.Replace("<%UserLogsOnAs%>", user.ProviderUserKey.ToString());<br />
<br />
string mail = e.Message.Body.ToString();<br />
System.Web.Mail.MailMessage objEmail=new System.Web.Mail.MailMessage();<br />
objEmail.Body=mail;<br />
objEmail.To = CreateUserWizard1.Email;<br />
<br />
<br />
<br />
try<br />
{<br />
SmtpMail.Send(objEmail);
ResultLabel.Text="Your Email has been sent sucessfully! Thank You!";<br />
}<br />
catch (Exception exc)<br />
{<br />
ResultLabel.Text="Send failure: " + exc.ToString();<br />
}
|
|
|
|
|
asem0525 wrote: "SendUsing" configuration value is invalid
What is the value of SendUsing ?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I don't have it in my entire code.
|
|
|
|
|
Hi,
I was wondering if it was possible to use multi-valued parameters to fill a table in reporting services.
|
|
|
|
|
The question is in the subject.....i can't figure out how to do it
|
|
|
|
|
gates09 wrote: Can I use VB Methods I created in Reporting Services?
What do you mean by "VB Method"? Do you want to use the reporting service in VB project? If yes, the answer is Yes.
|
|
|
|
|
Okay that question is pretty terrible. What i was trying to say was that i have a report in reporting services and i wanted to use a method or function that i created in a class called PackingLabels. The Report and the class are in the same project.
Hopefully this is explained a little better. This happens to me every time i post a question.....i just confuse people.
|
|
|
|
|
My aim is to block the .doc file access through Url.
on IIS, I added a mapping to *.doc. This is a remote server that does not have dotnet installed.
On my application, I put a class which includes ProcessRequest method.
On the web.config, I have added
<add verb="*" path="*.doc" type="DocNamespace.DocClass,DocDllName>;
<add key="PathToRedirect" value="~/Fail.aspx>;
I compiled this class to dll and put it on my bin folder.
Error I find is
"Could not load file or assembly DocDllNameor one of its dependencies. The system cannot find the file specified."
I referred the below
<a href="http://www.15seconds.com/issue/020417.htm">http://www.15seconds.com/issue/020417.htm</a>[<a href="http://www.15seconds.com/issue/020417.htm" target="_blank" title="New Window">^</a>]
Please help.
Thanks
|
|
|
|
|
ss.mmm wrote: This is a remote server that does not have dotnet installed.
Then how are you deploying and running an ASP.NET application?
only two letters away from being an asset
|
|
|
|
|
Sorry, I should have written that the Remote Server has .Net Framework installed and not visual studio.
Thanks
|
|
|
|
|
On my local machine, when I try to access the .doc through browser, it takes me to the Fail.aspx and when I go through the application am able to access.
The problem is with dll. On the remote server, I get the error.
Please help.
Thanks
|
|
|
|
|
Could you please post your code?
|
|
|
|