|
You can't.
1 - AJAX means your page can call the server and ask for info. The server cannot contact your page, unless it's in a callback from a call originating at the client
2 - if you want to run code when the DB updates, you need to call it, a trigger only runs in the DB, not in your code
Your best bet is to run AJAX calls on a timer, and work out if the data updated. You can't call knowing it has.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i m working on a project which is basically for searching the medicines thru brand,manufacurer etc so...i want when i type a character in a textbox i need to get the matches from the database in dropdowlist.i want to do that in ajax...and typing next character it shud display the words starting with those characters in that dropdowlist if anybody have sample code regarding this, it will be helpful to me. Thanks in advance.
|
|
|
|
|
have you tried:
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx
|
|
|
|
|
ya i tried but nothing is der i mean to say no code idea...
|
|
|
|
|
well google the name of the control then and look, we cant just give you a chunk of code and do your work for you, that example provides enough code to get you started. dont be so lazy
|
|
|
|
|
|
Decimals problem.
I have a stored procedure that returns values as decimals if I run it on query analyzer. The problem I have is that when the value
is passed to my asp.net application the decimal places disappear and the values are rounded to the nearest whole number.
Here is my stored procedure:
CREATE PROCEDURE sproc_GetTown
(
@Town varchar(100),
@TdPermUnits As int OUTPUT,
@TdHHUnits As int OUTPUT,
@TdHH Decimal(9,2) OUTPUT,
@TdPerm Decimal(9,2) OUTPUT,
@TdTotal int OUTPUT
)
AS
SELECT @TdPermUnits = TP_TOTAL, @TdHHUnits = THH_TOTAL FROM TOWN
WHERE Town = @Town
SELECT @TdTotal = @TdPermUnits + @TdHHUnits
SELECT @TdPerm = 100.00 * @TdPermUnits / @TdTotal
SELECT @TdHH = 100.00 * @TdHHUnits / @TdTotal
GO
Here is my asp.net application:
oCmd = New SqlCommand("sproc_GetTown", oConn)
oCmd.CommandType = Data.CommandType.StoredProcedure
oParam = oCmd.Parameters.Add("@Town", Data.SqlDbType.VarChar, 100)
oParam.Direction = Data.ParameterDirection.Input
oParam.Value = Townland
oParam = oCmd.Parameters.Add("@TdHH", Data.SqlDbType.Decimal, 9, 2)
oParam.Direction = Data.ParameterDirection.Output
oParam = oCmd.Parameters.Add("@TdPerm", Data.SqlDbType.Decimal, 9, 2)
oParam.Direction = Data.ParameterDirection.Output
oParam = oCmd.Parameters.Add("@TdHHUnits", Data.SqlDbType.Int, 4)
oParam.Direction = Data.ParameterDirection.Output
oParam = oCmd.Parameters.Add("@TdPermUnits", Data.SqlDbType.Int, 4)
oParam.Direction = Data.ParameterDirection.Output
oParam = oCmd.Parameters.Add("@TdTotal", Data.SqlDbType.Int, 4)
oParam.Direction = Data.ParameterDirection.Output
oConn.Open()
oCmd.ExecuteNonQuery()
oConn.Close()
Dim ldcTDHH As Decimal
ldcTDHH = oCmd.Parameters("@TdHH").Value
The value in ldcTDHH is always rounded off to the nearest whole number.
Anyone know whats wrong?
macca
|
|
|
|
|
apply the value to a string in the code behind then convert to a decimal in code behind, this might help
|
|
|
|
|
Excuse me, I clicked the unhelpful button but it somehow marked this as the Answer !!!
|
|
|
|
|
try
decimal.Round() method. and then round to two decimal places
|
|
|
|
|
Are you certain that the value in the ldcTDHH variable is rounded off? How do you determine what the variable actually contains?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Try by splitting the decimal value in 2 strings and passing with concatenation, don't forget to add "." in between.
If DBMS is SQL Server 2005, it will work...the problem is due to different ways .NET and SQL Server 2005 stores the decimal value.
HTH
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
I was experimenting with some Norwegian translation of an ASP.NET 2.0 application (Web Site project in VS05, hosted in IIS7 on Vista x64), and I tried to use resource files created for the NO generic culture, for example Messages.no.resx. The file was placed in the App_GlobalResources directory alongside many other locale-specific cultures (such as Messages.it-IT.resx) which always worked fine.
The problem is that now, even if I removed all the .no.resx files (because generic cultures are not suitable for numbers/dates formatting), the ASP.NET runtime keeps throwing an exception at application startup that reads:
mscorlib thrown System.NotSupportedException
Culture 'no' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture.
There are no traces of the .no.resx files, but still the runtime keeps loading them. I tried several times to run iisreset , kill the ASP.NET worker process, clear the Temporary ASP.NET Files folder (%WINDIR%\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files ) with no luck. I even tried to remove and recreate the application in IIS, still with no success, but if I recreate it with another name, it works. If I copy the files over to another machine, all works fine.
Is there a way to completely reset the status of an application, or to completely reset the code cache that ASP.NET seems to keep even after restarting the machine?
|
|
|
|
|
hi
i want to use a function to select second 100 rows or third 150 rows. anyone know about it and can help me.
i have 500 records and i want select records numbers between 300 and 400 how doing it??
thank you
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
just write a sql statement using the between function
select * from table where field between 300 AND 400
|
|
|
|
|
select * from myTable where colname <= 400 and colname >= 300 order by colname
this code will return 100 rows which values of colname are between 300 and 400.
I Love T-SQL
modified on Thursday, May 1, 2008 6:34 AM
|
|
|
|
|
Try this:
select * from (
select
(select count(*) from action t2 where t2.action_when <= t1.action_when) as RowIndex,
t1.*
from
action t1) t3
where
RowIndex between 10 and 20
substitute your own table and column names as appropriate.
If you are using SQL 2005 you can use rank() over. I'll leave you to look that up as required.
|
|
|
|
|
This really should have been posted in the SQL forum.
|
|
|
|
|
Yes, you have right and I agree with you.
I Love T-SQL
|
|
|
|
|
Hi
I have the following code:
hl_email_to_.Attributes.Add("blahblah");
How can I set the cssclass through the above code? I know how to set indivdual factors such as background but how do I set the entire class?
thanks
|
|
|
|
|
Either:
object.Attributes.Add("class", "dummy");
or
object.CssClass = "dummy";
|
|
|
|
|
I am using asp.net with c#.
I have to create flowchart and some diagram.
can any one tell me how i will draw on my web page.
thanks
|
|
|
|
|
you will probably need a bespoke asp.net graph program, there are plenty out there
|
|
|
|
|
SVG is one option, Flash is another. Silverlight is a third. Finally, you can just buy a dedicated library.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a HTML form that contains name,email phone number etc.
i have to make a aspx form that recieve text of HTML form.
Pls tell me How to send values to aspx form from HTML form and How to use these values in HTML forms
|
|
|
|