|
when i am keeping brackets for onClick="imgSave_Click()", i am getting error that is, No overload for method 'imgSave_Click' takes '0' arguments
|
|
|
|
|
At the moment, the client-side click attribute is being rendered as something similar to:
return SaveConfirm(); DoTheValidation()
None of the code after the return statement will execute, which is why the validation isn't firing.
Try changing the code to:
OnClientClick="if(!SaveConfirm()){return false;}"
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I want append Gridview using threading in asp.net
actually i want to do something like bind GridView from code behind using multi thread something like in social networking sites few content appears and remaining also keep appending
like: when we login into any social networking site the output result comes with few content and remaining content continues to append
|
|
|
|
|
MultiThreading would be the wrong approach for this because the Threads would execute on the server and prevent your page from being sent to the client. You'd need to use JavaScript which is accessing a web service and retrieve the data that way.
|
|
|
|
|
I am trying to encrypt a password in asp.net.
I have a VB code that does the same.
Please tell me a asp.net equivalent of the following code
Dim processPwd = New ProcessPassword()
Dim encryptedPwd = String.Empty
encryptedPwd = processPwd.EncryptPassword(TxtPassword.Text)
Note- my server only accepts the encryption done by the above way, so please suggest accordingly.
Thanks
|
|
|
|
|
maverick12131 wrote: Please tell me a asp.net equivalent of the following code
ASP.NET is not a language. You have a VB code which should be very well valid for a ASP.NET code behind. Use it.
If you are looking for C#:
ProcessPassword processPwd = new ProcessPassword();
string encryptedPwd = string.Empty;
encryptedPwd = processPwd.EncryptPassword(TxtPassword.Text);
|
|
|
|
|
In addition to sandip's answer you can also convert your code from vb to c# or vice verse.
Conversion tool from C# <--> VB[^]
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
ASP.Net is a web technology, primarly using serverside code in C# and client side JavaScript.
You can simply convert the piece of code to C# code.
ProcessPassword processPwd = New ProcessPassword();
String encryptedPwd = String.Empty;
encryptedPwd = processPwd.EncryptPassword(TxtPassword.Text);
|
|
|
|
|
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.
|
|
|
|