Posts

Understanding ASP.NET MVC using real world example, for beginners and intermediate

Image
ASP.NET MVC First thing is to understand the ASP.NET MVC framework itself, once we’ve gotten enough understanding of the ASP.NET MVC framework, then it would be a lot easy for us to understand why ASP.NET team provided us with this framework. In web development, there are different schemes used to create web sites and web applications, which at a minor age don’t seem to cause a problem. Solving a bug might take hours of headscratching and some other help too. It is harder to find the problem that is scripted inside the HTML web page. In these scenarios, it is always found helpfull to seperate your code from your data and from your HTML markup. This would make it a lot easier to find and solve the problem. Because, now all of the code has been seperated and finding the problem at exact location won’t be a harder task. These three fields are divided and make up the MVC; Model, View and Controller pattern for web development. Actually this is not a pattern, specific to the web dev...

(nested gridview):How to Get parent gridview rowindex on a child gridview link button click

 GridViewRow Gv2Row = (GridViewRow)((LinkButton)sender).NamingContainer; GridView Childgrid = (GridView)(Gv2Row.Parent.Parent); GridViewRow Gv1Row = (GridViewRow)(Childgrid.NamingContainer); int b = Gv1Row.RowIndex;

how to get list of tables, functions and stored procedure created last month in sql server

SELECT         [name]        ,create_date        ,modify_date FROM         sys.tables where create_date >='03/01/2015'                                         SELECT * FROM sys.procedures WHERE  create_date >='03/01/2015' SELECT * FROM sys.objects WHERE type IN ('FN', 'IF', 'TF')  -- scalar, inline table-valued, table-valued

how to get files from google drive

<head runat="server">     <meta http-equiv="content-type" content="text/html; charset=utf-8" />     <title>Google drive attachment Example</title>     <script type="text/javascript" src="https://apis.google.com/js/api.js?onload=onApiLoad"></script>     <script type="text/javascript">         function onApiLoad() {             gapi.load('auth', { 'callback': onAuthApiLoad });             gapi.load('picker');         }         function onAuthApiLoad() {             window.gapi.auth.authorize({                 'client_id': '376407259412-3m7pu8htrdvf2u2tt9flm9o8pftioqj6.apps.googleusercontent.com',                 'scope': ['https://www.googleapis.com/auth/drive']  ...

Error 80043004 solved in windows phone

Hello Guys,                      from last month i was suffering with this error. but today i have solved this error.                      month ago i changed my hotmail id password. so i was getting this error.                    for solve this go to in your xbolx live. and here login again with your new password  and the problem will solve. 

Using comma separated value parameter strings in SQL IN clauses

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[CSVToTable] (@InStr VARCHAR(MAX)) RETURNS @TempTab TABLE    (id int not null) AS BEGIN     ;-- Ensure input ends with comma SET @InStr = REPLACE(@InStr + ',', ',,', ',') DECLARE @SP INT DECLARE @VALUE VARCHAR(1000) WHILE PATINDEX('%,%', @INSTR ) <> 0 BEGIN    SELECT  @SP = PATINDEX('%,%',@INSTR)    SELECT  @VALUE = LEFT(@INSTR , @SP - 1)    SELECT  @INSTR = STUFF(@INSTR, 1, @SP, '')    INSERT INTO @TempTab(id) VALUES (@VALUE) END RETURN END GO This creates a user function that takes a comma separated value string and converts it into a table that SQL does understand - just pass it the sting, and it works it all out. It's pretty obvious how it works, the only complexity is the REPLACE part which ensures the string is terminated with a single comma by appending one, and removing all double commas fro...

some comman shortcuts

F1 Display Help Ctrl+C Copy the selected item Ctrl+X Cut the selected item Ctrl+V Paste the selected item Ctrl+Z Undo an action Ctrl+Y Redo an action Delete Delete the selected item and move it to the Recycle Bin Shift+Delete Delete the selected item without moving it to the Recycle Bin first F2 Rename the selected item Ctrl+Right Arrow Move the cursor to the beginning of the next word Ctrl+Left Arrow Move the cursor to the beginning of the previous word Ctrl+Down Arrow Move the cursor to the beginning of the next paragraph Ctrl+Up Arrow Move the cursor to the beginning of the previous paragraph Ctrl+Shift with an arrow key Select a block of text Shift with any arrow key Select more than one item in a window or on the desktop, or select text within a document Ctrl with any arrow key+Spacebar Select multiple individual items in a window or on the desktop Ctrl+A Select all items in a document or window F3 Search for a file or folder Alt+Enter Display properties for th...