|
Who can help me on expression i want the format must be 20.00 must .00 at the back , what i should add in with my expression?
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator"
ValidationExpression="^\s*\$?\s*\d{1,3}((,\d{3})*|\d*)(\.\d{2})?\s*$">*</asp:RegularExpressionValidator>
this expression only can check first digit cant be .
only allow digit, and cant check after . must be 2digit at the back for example 20.00
|
|
|
|
|
Hi,
I am not sure about the Regular expression but have couple of other solutions.
1) if you need to store decimal point in the database then that can be done through c# code as well.
decimal.Round(yourValue, 2, MidpointRounding.AwayFromZero);
2) Another way is to create javascript on the lost focus of your textbox. in the javascript function you can check for the decimal point if it is not exist then you can append that in the text box.
Hope this information may lead you to some work around.
Best luck
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
Try it this way:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator"
ValidationExpression="^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$">*</asp:RegularExpressionValidator>
He who goes for revenge must first dig two graves.
|
|
|
|
|
Hi,
i have a doubt about how to display a grid view in ASP.NET from SQL server 2012 according to the instruction given by drop down list from multiple tables. For example say, I have created 2 tables Members and Item where Member.Mid=Item.Mid set as primary and foreign key. okay, now my question is how should write or set code for to display according to the value selected from dropdown list in one gridview.
Once again, I want display in one gridview from multiple tables according to the value from dropdownlist...
I am using C# in VS2012 and SQLserver 2012.
Thank you in advance...
S.Thomas.
S.Thomas
|
|
|
|
|
Use a stored procedure which gives you the results back.
To merge the results from multiple tables in a SQL query, you need to use joins[^].
There are furthermore different types of joins:
-inner join[^]
-left join[^]
-right join[^]
-full join[^]
|
|
|
|
|
Hi All,
I want to connect to a SQL Server database saved on URL
database name fc000xststsql01.IVRCallCenterTest
server address http://ma001xsicmw91/IVRControllerAppProd/Home/
what would be the connection string I will use in web config file ?
Thanks
|
|
|
|
|
|
hi Vani,
the examples in these pages are just talking about a SQL Server database that is local on the same hard drive but how to connect to a database on a URL
Thanks
|
|
|
|
|
<connectionStrings>
<add name="REOU_DB" connectionString="Data Source=AMT-03;Initial Catalog=reouLive11-sep-2012;Persist Security Info=True;User ID=sa;Password=amt12345" providerName="System.Data.SqlClient" />
</connectionStrings>
Aatif
|
|
|
|
|
I have an application/Web application on VS2010 , I need to fetch data from Oracle database without having client installed on my VS2010 machine. I have done this in J2EE through connectivity jars available freely. Can anyone please help me how to do this without oracle client. Is there any DLL available which i can add as a reference...
thanks in Advance
|
|
|
|
|
Add a reference to System.Data.OracleClient.dll which is part of the .Net Framework. Then you can use the System.Data.OracleClient namespace in your project. Note: You'll get a lot of warnings that that is obsolete, but you said you don't want to install the client...
|
|
|
|
|
Thanks Hiller for this quick response, i can't find System.Data.OracleClient.dll while adding the reference.
|
|
|
|
|
|
You can use the Microsoft DLL, but it's been discontinued and no longer supported, or use the Oracle DLL, which is pretty fast in operation. I used the Oracle DLL's, and it took me a couple of days to figure out the whole thing.
I think there was a installation program I had to run on the web server that installed some stuff to connect to the Oracle Server.
ODAC1120320Xcopy_32bit - This program
Oracle.DataAccess.dll
Oracle.Web.dll
a sample connection string, and reader programming. All types, integer, string ended up being just GetValue.
Dim conStr As String = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SQL1.domain.local)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE))); User Id=RC_PUBLIC_USER; Password=SECURE;"
Dim con As New OracleConnection(conStr)
Dim cmd As New OracleCommand(cmdQuery, con)
cmd.CommandType = Data.CommandType.Text
con.Open()
Dim oReader As OracleDataReader = cmd.ExecuteReader
While oReader.Read()
pI(rC).p_ID = oReader.GetValue(0) 'PN_ID
pI(rC).c_ID = oReader.GetValue(1) 'C_ID
pI(rC).c_Name = oReader.GetValue(2) 'C_Name
Anyways, I really like the Oracle Platform 11.g, hard to understand at first, because they don't use tables, Technically they say there are no such thing as tables. It's really fast, wow
Others told me to use I think ADO, or some other universal way to connect, your choice.
|
|
|
|
|
This IS the best way. Oracle uses local and server settings in a funny way, and the Oracle library uses all that stuff correctly. We use this method a lot - millions of calls per day - and it works great!
|
|
|
|
|
That's good to hear, it was a coin toss in terms of which method to use for me, glad I choose the right one.
I'm happy with it, works great.
|
|
|
|
|
We have code that is both ways right now but we're changing over to the new one whenever we encounter the old one being used. Killing it by attrition.
|
|
|
|
|
|
System.Data.OracleClient.dll is still in some old code. It's pretty easy to switch.
|
|
|
|
|
hi everybody
can anyone let me know what is worker process...and expansion of w3wp...how can i download it?i have VS2010,iis7,SQLSERVER 2008 R2..and win 7 ultimate OS...what is R2 in sqlserver 2008R2
|
|
|
|
|
Member 8701813 wrote: what is R2 in sqlserver 2008R2
There was SQL Server 2008. Afterwards, Microsoft fixed some problems and bugs and released it again but called it
SQL Server 2008 R2, where R2 stands for Release 2.
Member 8701813 wrote: worker process
MSDN - The ASP.Net Worker Process[^]
|
|
|
|
|
Can you please tell me what is SSPI full form in sql server in integrated security?
Thank you,
S.Thomas.
|
|
|
|
|
SSPI - Security Support Provider Interface - Security Support Provider Interface (SSPI) is an API used by Microsoft Windows systems to perform a variety of security-related operations such as authentication.
Refer: MSDN: SSPI[^]
|
|
|
|
|
|
for my page i have 88 CheckBox when the page is load i want set the selected to false. so any one can help me create a for loop when page is load all the checkbox set to false by using
<asp:CheckBox ID="CheckBoxXS" runat="server" Text=" XS" onClick="forXS(this)" class="checkboxS" OnCheckedChanged="CheckBoxXS1_CheckedChanged"/>
function forXS(sender) {
var tb1 = document.getElementById('<%= txtXS.ClientID %>');
tb1.style.display = sender.checked ? 'inline' : 'none';
if (tb1 != null) {
tb1.focus();
ValidatorEnable(document.getElementById('<%= val1.ClientID %>'), sender.checked);
}
}
________________________________________________
can use Java Script fumction for this and call on page load as below: but i dont know how to place inside my script
function UncheckAll(){
var w = document.getElementsByTagName('input');
for(var i = 0; i < w.length; i++){
if(w[i].type=='checkbox'){
w[i].checked = false;
}
}
}
|
|
|
|