How to read text file in c#: In c sharp it is very easy to read a complete text file
Tag Archives: c sharp
aspx master page or inner page image problem
We mostly face a content path problem if we maintain your inner pages, master pages and may be images in different directores (folders). Due to this problem we are unable to see images on web browser.
C# Multithreading Example Tutorial
For better performance we can use multithreading in our programm. We use thread for heavy processes like load data from database or during use of Internet, otherwise you will feel hanged your User Interface.
Check Internet Connection c#
This example will describe how to check Internet connection in asp.net using c sharp language. During code we mostly check if user is connected with remote server or not.
Programmatically set selected value of Dropdownlist aspx
How to programmatically set selected value of Dropdownlist aspx during loading of data: We can select programmatically a value on dropdownlist by it’s index. If we need to select by text then we need FindByText method as described in following line.
Unable to find manifest signing certificate in the certificate store
Some time this error occur after upgrading old Visual Studio project to new. Here is the quick fix.
Theme ‘Standard’ cannot be found in the application or global theme directories
Check necessary files in the App_Themes directory. When we publish our project then some files could be missed. Right click on that file (that are missed) click on property and choose “Copy to Output Directory” set as “Copy always“.
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
This exception occur when we try to redirect a page. Solution: To solve this problem we should use second argument of Response.Redirect that will stop current page’s execution and move to next page. Sencond argument should be false. Full solution is below [sociallocker] Response.Redirect(“http://www.wisdomitsol.com”,false); [/sociallocker]
Get data from database compare by datetime or by only date using linq
1. Compare by datetime public List<tblName> getByDateTime(DateTime dateTime) { return objEntity.tblName.Where(p => p.publish_time <= dateTime).ToList(); } Call above function