|
niki_nilu wrote: strSqlCmdText = "insert into tUser values( " + Convert.ToInt32(txtUserCode.Text) + " , "+
" " + " ' " + txtUserID.Text + " ' " + "," + " ' " + txtFirstName.Text + " ' " + ", "+
" " + " '" + txtLastName.Text + "'" + "," + " ' " + txtPassword.Text + " ' " + ", "+
" " + "'" + txtUserType.Text + "'" + ", "+
" " + "'" + dtpWarningDate.SelectedDate + "'" + " , "+
" " + "'" + dtpExpireDate.SelectedDate + "'" + ", "+
" " + "'" + drpdwnStatus.SelectedItem.Text + "'" + ", "+
" " + "'" + Session["LoginName"].ToString() + "'" + ", "+
" " + "'" + dtpCreateDate.SelectedDate.ToString() + "'" + ", "+
" " + "'" + txtUpDatedBy.Text + "'" + ", "+
" " + "'" + dtpUpdateDate.SelectedDate.ToString() + "'" + ")";
Ohhhh SQL Injection attack[^]. Check this and try to change your code
|
|
|
|
|
Try it like this :
string myByte = "Stingtest";
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();
Byte[] bytes = encoding.GetBytes(myByte);
myByte = "";
myByte = encoding.GetString(bytes);
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
is there is any code to change the tool tip styles
|
|
|
|
|
jagadeeshkumar2106 wrote: Is there any code to change the tool tip styles
I think you probably need to use the custom tooltip control or DIV with javascript.
|
|
|
|
|
sir will u help wiht code in this regard
|
|
|
|
|
You can google with those keywords "Javascript tooltip" or "asp.net ajax tooltip"
|
|
|
|
|
|
Hi all,
I have developed an application comprising classic ASP and ASP.NET 2.0. I have used frames in asp to call .NET pages. Its working fine on my local macine but when i uploaded it to the server it gives me yhe foll error
"Unrecognized configuration section 'connectionStrings'"
I also checked the ASP.NET tab in IIS and its alraedy set to 2.0. What can be the problem???? I have also restarted the server but no gain. Pls help!!!!!
When you fail to plan, you are planning to fail.
|
|
|
|
|
www.Developerof.NET wrote: "Unrecognized configuration section 'connectionStrings'"
I would like to suggest you to do some possibilities.
1. Please check the ASP.NET version both "Default Website" and "Individual Virtual Directory"
2. Instead of uploading your project, you should create very sample project and upload it on the server. And see whether it is working or not.
3. Find the differences between the global web.config or machine.config of your server and the machine that you said it works.
|
|
|
|
|
following is the regular expression which i a using for the whole numbers and fractionl numbers(1 , 2 , 9999 , 3.9 , .8 , .09)
[0-9]*.[0-9]*
when i tested for the 1s it did not occur any error
Please help
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
modified on Thursday, December 27, 2007 11:55:07 PM
|
|
|
|
|
Hi..
Try this
[0-9]*[.][0-9]*
Aswini
|
|
|
|
|
ThanQ.
I wanted that textbox can accept both whole numbers as well as te fractional numbers
The expression , which u provided , excepts only fractional values
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
here is ur solution,
"^[1-9]+[0-9]*(\.{1}[0-9]+)?"
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
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?
|
|
|
|