RegisterClientScriptBlock RegisterStartupScript

RegisterClientScriptBlock - RegisterStartupScript farkı:

RegisterStartupScript jquery autocomplete'in çalışmasını engelledi. RegisterClientScriptBlock ile değiştirince sorun ortadan kalktı.

resolveclienturl resolveurl

ResolveClientUrl("~/css/style.css") : MyWebSite/css/style.css
ResolveUrl("~/css/style.css") : /MyWebSite/css/style.css

/ : website'ın root'una çıkarıyor.

urlrewriting uygulandığında css ve js için path sorunu olabiliyor. resolveclienturl yerine resolveurl metodu kullanıldığınd bu sorun ortadan kalkıyor:

litCss.Text = "link +="" css="" href="" rel="stylesheet" resolveurl("~="" style.css")="" type="text/css">link";

bazı durumlarda (ki bunu netleştiremedim henüz) aspx'ten çağrılan protected metodlar çalışmıyor:

hyperlink'in navigateurl'i için yazdığım protected string getnavigateurl() çağrılmıyor.
ama page_load'da bu hyperlink'in navigateurl'ine değer atayabiliyorum.

basic t-sql commands

-- add primary key to a table
ALTER TABLE Karar ADD CONSTRAINT
PK_Karar PRIMARY KEY NONCLUSTERED
(
KararId
) ON [PRIMARY]
GO

-- change data type of a column
alter table Products
alter column ProductName varchar(250)

Supression of Click Sound on WebBrowser Navigate

Open the Sounds and Multimedia Control Panel applet (go to Start, Settings, Control Panel, and double-click Sounds and Multimedia).
Select the Sounds tab.
Under Sound Events, navigate to the Internet Explorer section.
Navigate to Start Navigation and remove the sound for this event by selecting "none."
Click OK.

OR

Start the registry editor (e.g., regedit.exe).
Navigate to the HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating subkey.
Select the .current subkey.
Select Delete from the Edit menu.
Click Yes in the confirmation dialog box.

http://social.msdn.microsoft.com/forums/en-US/winforms/thread/e72b37d2-d20b-4a59-8560-24a10b17db97/

bir tablo uzerinden iliskili diger tabloyu guncelleme

UPDATE TABLE1
SET Column1 = (SELECT TABLE2.Column1
     FROM TABLE2
WHERE TABLE2.IDColumn = TABLE1.IDColumn)

update yayin
set ukod = s.ukod
     from yayin y, sayfa1$ s
where s.yayinno = y.yayinno

bir tablonun id alanina deger atamak

DECLARE @ID decimal
SET @ID = 0

DECLARE #cursor CURSOR FOR
(SELECT _ID FROM _TABLE)

OPEN #cursor
FETCH NEXT FROM #cursor

WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE _TABLE
SET _ID = @ID + 1
WHERE CURRENT OF #cursor
SET @ID = @ID + 1
FETCH NEXT FROM #cursor
END

CLOSE #cursor
DEALLOCATE #cursor

sql server full-text search


sorun:
SQL Server encountered error 0x80070218 while communicating with full-text filter daemon host (FDHost) process. Make sure that the FDHost process is running. To re-start the FDHost process, run the sp_fulltext_service 'restart_all_fdhosts' command or restart the SQL Server instance.


çözüm:
EXEC sp_fulltext_service 'restart_all_fdhosts'


sorun devam ediyorsa:
sql server configuration manager --> sql full-text filter daemon launcher
çalıştığından emin ol.


sorun devam ediyorsa:
sql server configuration manager --> sql full-text filter daemon launcher
log on as değerinin sql server'ınki ile aynı olduğundan (local system, local service, network service) emin ol.


tabloya full-text index tanımlama:
tabloya sağ tık --> full-text index --> define full-text index...


full-text index kullanarak arama yapma:
select *
from Mevzuat
where contains (MevzuatAdi, 'YERALTI or DEVLET')



eğer query sonuç döndürmüyorsa:
full-text index'i silip yeniden yarat.

not: query'nin ilk çalışması yavaş olabilir. diğer çalışmalar hızlı olacaktır.

search this blog (most likely not here)