Search This Blog
Wednesday, December 30, 2009
Saturday, December 26, 2009
Tuesday, December 22, 2009
Friday, December 18, 2009
SQL REPLACE
Update tbl_mytbl
Set [Content]=convert(ntext,REPLACE(convert(varchar(8000),[Content]),'ddd/pdf/','Documents/'))
where Content LIKE '%ddd/pdf/%'
REPLACE for nTEXT datatype
Update mytable
Set [Content]= cast(replace(cast([Content] as nvarchar(max)),'myfolder/pdf/','Documents/') as ntext)
where Content LIKE '%myfolder/pdf/%'
Wednesday, December 16, 2009
TFS Team Foundation Build
Publish website using team build:
http://blogs.msdn.com/nagarajp/archive/2005/10/21/483697.aspx
http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/bf3da82d-6eda-4f36-9753-b63e98a72909
OTHER":
http://blogs.msdn.com/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx
http://blogs.msdn.com/angelab/archive/2008/03/03/more-how-do-i-videos-for-tfs-2008.aspx
Tuesday, December 15, 2009
Monday, December 14, 2009
URL Rewriting in .NET
Thursday, December 10, 2009
Using relative urls in stylesheets
The urls in the stylesheet are with reference to the css file
http://stackoverflow.com/questions/940451?sort=oldest#sort-top
Wednesday, December 9, 2009
String or binary data would be truncated.
I was getting this error when i was trying to delete some rows from the table.
Monday, December 7, 2009
Use relative paths in Master pages
do the same for js files etc. e.g
<script src="<%=XYZ.ABC.DRR.Settings.SiteStandardRoot%>WebMods/Themes/MyTheme/scripts/AC_RunActiveContent.js" type="text/javascript"></script>Wednesday, December 2, 2009
SMTP setup on Win 2k8 server
http://stackoverflow.com/questions/226655/setting-up-smtp-under-iis-7-on-windows-server-2008
In SMTP server:
- Access tab
- Authentication > Anonymous
- Connections > All except the list below (list is empty)
- Relay > All except the list below (list is empty)
Suppress Javascript errors from showing up
function stoperror()
{ return true; }
window.onerror=stoperror;
Tuesday, December 1, 2009
Monday, November 30, 2009
Create a Custom DNN Module
http://www.codeproject.com/KB/custom-controls/Creating_A_DNNModule.aspx
http://www.codeproject.com/KB/custom-controls/SuperfastSuperEasyDotNetN.aspx
http://www.codeproject.com/KB/applications/LCTDNNModDev.aspx
http://adefwebserver.com/dotnetnukehelp/LinqTutorial/
http://www.15seconds.com/issue/050505.htm
http://www.dnncreative.com/Forum/tabid/88/forumid/5/postid/231/view/topic/Default.aspx
Tuesday, November 24, 2009
Cannot Find SharePoint Site or SharePoint Server Instance
This problem can occur when the workflow deployment process cannot open the SharePoint site.
Error Messages
-
SharePoint Server not available.
-
Cannot find a SharePoint server instance.
-
Cannot find the specified SharePoint site: <site URL>.
Resolution
-
Ensure that SharePoint Server is running.
-
In the Properties window, ensure that the site specified in the Target Site field is a valid SharePoint site.
-
Examine the SharePoint diagnostic log files. The default location of these log files is drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. If you cannot find the log files at this location, refer to the diagnostic logging settings in the SharePoint Central Administration Tool. For more information, see the documentation for Office SharePoint Server 2007.
http://msdn.microsoft.com/en-us/library/ee231594(VS.100).aspx
Monday, November 23, 2009
Tuesday, November 17, 2009
Free SMTP server
Windows 7 does not provide an SMTP server service so we have to use a free SMTP server:
Monday, November 16, 2009
Sunday, November 15, 2009
Friday, November 13, 2009
Service Unavailable HTTP Error 503. The service is unavailable.
Thursday, November 12, 2009
Wednesday, November 11, 2009
MY SQL connection string for .NET
Tuesday, November 10, 2009
Saturday, November 7, 2009
Thursday, November 5, 2009
Wednesday, November 4, 2009
Handling Lookup columns in CAML queries
Access Joomla files - Tutorial
Tuesday, November 3, 2009
Monday, November 2, 2009
Tuesday, October 20, 2009
Assign CSS on the basis of browser
<link type="text/css" rel="stylesheet" href="css/jquery.jcarousel.css" media="screen, projection" />
<!--[if IE]>
<style>
#browser-controls li.txturl input
{
width: 340px; /*367 *..340/
/* height: 20px; */
height:24px;
padding:0px;
/* list-style: none; */
}
</style>
<![ENDIF]-->
you can also use the link tag instead of the inline style tag
Javascript to assign CSS on the basis of browser
Wednesday, October 7, 2009
Tuesday, October 6, 2009
Monday, October 5, 2009
Google API for Dot Net
// Search 32 results of keyword : "Google APIs for .NET"
GwebSearchClient client = new GwebSearchClient(/* Enter the URL of your site here */);
IList<IWebResult> results = client.Search("Google API for .NET", 32);
foreach(IWebResult result in results)
{
Console.WriteLine("[{0}] {1} => {2}", result.Title, result.Content, result.Url);
}
The above not working in vb.net so did the following:
Public Sub GetGoogleResults()Dim client As New GwebSearchClient("/* Enter the URL of your site here */") Dim results As IList(Of IWebResult) results = client.Search(txtQuery.Text, 50, Nothing, Nothing, SafeLevel.GetDefault(), Language.GetDefault(), DuplicateFilter.GetDefault()) For Each result As Google.API.Search.IWebResult In results Literal1.Text = Literal1.Text + String.Format("<h3>[{0}]</h3> {1}<br> " + "<a href=' {2} ' target='blank'>{2}</a><BR>", result.Title, result.Content, result.Url) Next End Sub
Sunday, October 4, 2009
Simple ViewState Property
Friday, October 2, 2009
Thursday, October 1, 2009
Wednesday, September 30, 2009
Tuesday, September 29, 2009
Monday, September 28, 2009
Anonymous access in server 2008 IIS
System.DirectoryServices.DirectoryServicesCOMException: Logon failure: unknown user name or bad password.
Friday, September 25, 2009
SharePoint WildCard Search
http://nullexception.net/2009/03/sharepoint-2007-wildcard-search/
http://www.codeplex.com/SPWildCardSearch - it is a web part that allows for WildCard Searches
http://kmpipeline.blogspot.com/2007/05/free-moss-wild-card-search-add-on.html - Ontalica add on for wild card search (FREE)
Thursday, September 17, 2009
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Monday, September 14, 2009
Unrecognized attribute 'requirePermission'
Sunday, September 13, 2009
Friday, September 11, 2009
Wednesday, September 9, 2009
Tuesday, September 8, 2009
Monday, September 7, 2009
Blog Module with DNN 5.1.2
Sunday, September 6, 2009
Saturday, September 5, 2009
Friday, September 4, 2009
Thursday, September 3, 2009
Tuesday, September 1, 2009
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
Thursday, August 20, 2009
Monday, August 10, 2009
Wednesday, August 5, 2009
Tuesday, August 4, 2009
Sunday, August 2, 2009
Check if QueryString Exists
Response.Write("QueryString does not exist!")
Else
End If
Thursday, July 30, 2009
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID{61738644-F196-11D0-995
1. Open the registry and go to "HKEY_CLASSES_ROOT\CLSID\{
2. Go to Component Services via Start -> Control Panel -> Administrative Tools -> Components Services. Expand the Component Services branch then expand "Computers", "My Computer", and "DCOM Config". Right-click on "Machine Debug Manager" (or whatever your CLSID represents) and choose Properties. Click on the Security tab and under “Launch and Activation Permissions” select "Use Default". Click OK, close the Component Services window. The error should disappear now.
Wednesday, July 29, 2009
Sunday, July 26, 2009
Friday, July 24, 2009
Use multiple columns in a databound drop down list
Get data from DataReader using column name
Thursday, July 23, 2009
Wednesday, July 22, 2009
Sunday, July 19, 2009
'System.Array' does not contain a definition for 'Contains' ...
using System.Linq; and (possibly):
using System.Data.Linq; // not sure about the latter though.
Thursday, July 16, 2009
Wednesday, July 15, 2009
Accessing web.config key using javascript
Add javascript & HTML in Blogger posts
Use the HTML Parser to convert your code, and then post in blogger :)
Access function defined in parent from inside an Iframe
this page has an iframe which will call this method
<script type="text/javascript">
var myIframeUrl;
function modifyVar(val) {
myIframeUrl = val;
}
</script>
-----------
in the iframe use this statement:
<script type='text/javascript'>parent.modifyVar('" + requestURL + "');</script>"
Get form hidden variable value from outside the IFrame
Get Current URL of an Iframe
Monday, July 13, 2009
Read XLS and XLSX files using .net
Saturday, July 11, 2009
Thursday, July 9, 2009
Wednesday, July 8, 2009
Monday, July 6, 2009
Sunday, July 5, 2009
Wednesday, July 1, 2009
Hidden div not displaying in Firefox (display:none)
Post html form to aspx page
Tuesday, June 30, 2009
Monday, June 29, 2009
Sliding divs overlapping other divs in IE 7
Thursday, June 25, 2009
Wednesday, June 24, 2009
Monday, June 22, 2009
Sunday, June 21, 2009
Tuesday, June 16, 2009
Monday, June 15, 2009
Saturday, June 13, 2009
Thursday, June 11, 2009
Wednesday, June 10, 2009
Gnerate lorem ipsum text
You can also type “=lorem()” into Word to generate Lorem Ipsum text.
Syntax:
=lorem(paragraphs,sentences)
Example:
=lorem(6,20)
Or if you want random actual words from Word help files, you can use “=rand()” with the same optional (paragraphs, sentances) syntax.
.NET Framework and FTPS
http://blogs.msdn.com/adarshk/archive/2005/04/22/410925.aspx
After an effort of 2-3 days, however, I came to know that the .NET framework 2.0 till now supports only EXPLICIT FTP over SSL and not Implicit connection (which is usually established above port 990)
http://www.developmentnow.com/g/46_2006_5_0_0_755554/implicit-ftp--SSL-problem.htm
Turned out I could not do this without an external component involved. I tested the component available here and was able to connect to my FTP and didnt even require to verify the client certificate:
http://www.rebex.net/download/GetFileNotify.aspx?f=RebexTotalPack-Trial-1.0.3428.0-DotNet2.0.exe
A sample code of the function I used is:
Public Function GetFileByRebex()
Dim ftp As New Ftp()
ftp.Connect(ConfigurationManager.AppSettings("FTPUrl").ToString(), 990, Nothing, FtpSecurity.Implicit)
ftp.Login(ConfigurationManager.AppSettings("FTPUser"), ConfigurationManager.AppSettings("FTPPw"))
ftp.ChangeDirectory(ConfigurationManager.AppSettings("FTPWorkingDir"))
Dim fileNames As FtpList
fileNames = ftp.GetList()
Dim i As Integer
For i = 0 To (fileNames.Count - 1)
'Dim b As String
'b = fileNames.Item(i).Modified.Date.ToString()
If (fileNames.Item(i).Modified.Date.Equals(Today.Date)) Then
'Download file
todaysFileName = Now
todaysFileName = todaysFileName.Replace("/", "-")
todaysFileName = todaysFileName.Replace(":", "-")
ftp.GetFile(fileNames.Item(i).Name, Server.MapPath(ConfigurationManager.AppSettings("DownloadFolderName")) + todaysFileName + ".csv")
Exit For
End If
Next
End Function
Monday, June 8, 2009
Set up a DotNetNuke site
- Copy your site code to the new location
- Update the connection string in web.config
- Run the sql script on the server
- Grant EXECUTE permissions to ur database user on all the stored procedures
- update the application name in the aspnet_Applications table as well as the web.config applicationname attribute
- update the PortalAlias table in the database to set the new location
- browse your new site :)
Sunday, June 7, 2009
Wednesday, June 3, 2009
Access Server object in Class Library
http://forums.asp.net/t/647673.aspx
Just use System.Web.HttpContext.Current.Server.MapPath
Tuesday, June 2, 2009
Friday, May 29, 2009
Thursday, May 28, 2009
Anonymous access in Sharepoint
- List settings > Advanced permissions > Allow read permissions to "All Items" instead of Only "their own" and then recheck the list permissions for anonymous users.
Sunday, May 24, 2009
Thursday, May 21, 2009
Tag Cloud for Blogger
http://www.compender.com/2007/12/simple-tag-cloud.html
http://www.editthis.info/bloggerhacks/Recent_Posts_using_Labels_(or_Tagcloud)
http://phydeaux3.blogspot.com/2006/09/code-for-beta-blogger-label-cloud.html
http://www.compender.com/2007/12/simple-tag-cloud.html
http://phy3blog.googlepages.com/Beta-Blogger-Label-Cloud.html
http://www.bloggerbuster.com/2008/08/blogumus-flash-animated-label-cloud-for.html
Wednesday, May 20, 2009
Tuesday, May 19, 2009
Search with filetype on Google
Write Query then put a space and type "filetype:ext" (without quotes)
e.g.
User Interface Design filetype:ppt
Will search against the keyword User Interface Design and will result only ppt files.
Thursday, May 14, 2009
Wednesday, May 13, 2009
Friday, May 8, 2009
Thursday, May 7, 2009
Tuesday, April 28, 2009
HTTP 405 - Resource not allowed
Resolved the issue by setting .NET Framework in IIS > Default Web site > Properties > .NET Framework
It wasn't set to any value earlier.
Monday, April 27, 2009
Unable to emit assembly: Referenced assembly '' does not have a strong name
Solution of the assigning the strong name to the third part DLL by using following command on visual studio command prompt.
E.g. Lets say the name of the third party DLL is myTest.dll.
Step 1: Dis-assemble the assembly
ildasm myTest.dll /out:myTest.il
Step 2: Re-Assemble using your strong-name key
ilasm myTest.il /res:myTest.res /dll /key:myTest.snk /out:myTestSN.dll
This code work perfectly to assign strong name.
for verification you can use following command,
sn -vf myTestSN.dll
http://social.msdn.microsoft.com/forums/en-US/clr/thread/35930958-9775-4e56-bd38-0362d124ffc4/
Thursday, April 23, 2009
Tuesday, April 21, 2009
Overload resolution failed because no accessible 'Round' can be called without a narrowing conversion
http://www.dreamincode.net/forums/showtopic47072.htm
Replace Decimal.Round with Math.Round
Monday, April 20, 2009
Sunday, April 19, 2009
Apply minimum length validation using ASP.NET Validation Controls
Validation expression should be : /{numberOfCharacters}/
Comma indicates at least number of characters, no comma indicates exactly as much characters
<asp:RegularExpressionValidator
ID="revNewPW0"
runat="server"
ControlToValidate="textNewPassword"
ErrorMessage="Password should have at least 7 characters"
ValidationExpression="/{7,}/"></asp:RegularExpressionValidator>
Even better solution is here:
Friday, April 17, 2009
Wednesday, April 15, 2009
Monday, April 13, 2009
Central Administration > You are not authorized to view this page
Reason: Logon failure: unknown user name or bad password
Go to Inetmgr > Application Pools > SharePoint Central Administration v3 > Properties > Identity > Predefined > Network Service.
Then restart IIS once :) n u r done
Thursday, April 9, 2009
Tuesday, April 7, 2009
Wednesday, April 1, 2009
SharePoint My Site Scalability
http://www.slideshare.net/rwuhrman/sharepoint-my-site-101
http://odole.wordpress.com/2009/02/13/how-to-configure-shared-service-provider-and-mysite/
http://technet.microsoft.com/en-us/library/cc263115.aspx
http://technet.microsoft.com/en-us/library/cc261864.aspx
http://technet.microsoft.com/en-us/library/cc262706.aspx
http://blogs.msdn.com/markarend/archive/2008/04/14/scaling-mysites-how-many-mysites-per-content-db.aspx
http://blogs.technet.com/wbaer/archive/2008/06/10/planning-a-100-000-my-site-personal-site-deployment-notes.aspx
http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=123
http://technet.microsoft.com/en-us/library/cc263115.aspx - this is one of the links that can be useful for us
http://odole.wordpress.com/2009/02/13/how-to-configure-shared-service-provider-and-mysite/
Monday, March 30, 2009
'Service Unavailable' Resolution
http://support.microsoft.com/kb/823552
http://guru-web.blogspot.com/2007/10/central-administration-site-service.html
http://articles.icscentral.com/Kb%20Articles/271/823552.aspx
http://www.digwin.com/view/sharepoint-service-unavailable-application-pool-crashes
http://njbblog.blogspot.com/2007/05/sharepoint-error-service-unavailable.html
In my case, this issue was fixed by
- Right click on the application pool
- Click Identity Tab
- Choose "Configurable"
- Set to a domain account & enter password / or any user with administrator rights (you can even use the same user with which you are currently logged in)
- Restart IIS
Usually this error occurs when my domain account password has expired and I don't change it and keep on using the virtual machine (i.e. if my account password expires on 14th November, and I do not shut down my virtual machine or save its state on 12th November, then I run the virtual machine from the saved state on 15th November, so it creates a conflict between the logged in password and the actual password which has been changed on the active directory)
Sunday, March 29, 2009
Thursday, March 26, 2009
Friday, March 20, 2009
Select an item in dropdownlist dynamically
http://www.velocityreviews.com/forums/t123454-selecting-an-item-in-a-drop-down-list.html
Do it in DataBound event if u r binding the drop down from db
Selecting an item in a DropdownList dynamically
http://www.velocityreviews.com/forums/t123454-selecting-an-item-in-a-drop-down-list.html
Do it in DataBound event if u r binding data from db
Wednesday, March 18, 2009
The Controls collection cannot be modified because the control contains code blocks.
The Controls collection cannot be modified because the control contains code blocks.
Change <%=xyz%> to <%#xyz%>
Monday, March 16, 2009
SQL Server 2005 Express Error 3417
The file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
http://www.tomrafteryit.net/sql-server-2005-express-error-3417/
Sunday, March 15, 2009
Thursday, March 12, 2009
Wednesday, March 11, 2009
Tuesday, March 10, 2009
The entry 'ConnectionStringName' has already been added.
http://dev.communityserver.com/forums/t/478332.aspx
Try this:
<connectionStrings>
<remove name="ConnectionStringName" />
<add name="ConnectionStringName" connectionString="server=(local);uid=;pwd=;Trusted_Connection=yes;database=communityserver" />
</connectionStrings>