- The page lifecylce is simpler and more efficient
- There is no such thing as controls besides html controls. You don't need to debug your output to see ASP .Net is generating.
- ViewModels give you immense power and obliviate the need to do manual control binding and it eliminates many errors relating to binding.
- You can have multiple forms on a page. This was a serious limitation on WebForms.
- The web is stateless and MVC matches the architecture of the web more closely. Webforms introduces state and the bugs you have with it by introducing the Viewstate. The ViewState is automatic and works in the background, so it doesn't always behave the way you want to.
- Web applications need to work with ajax these days. It's not acceptable to have full page loads anymore. MVC makes ajax so so much better, easier and more efficient with JQuery.
- Because you can have multiple forms on a page, and because the architecture is driven by calls to urls, you can do funky things like ajax load a different form, like an edit form into your current page using JQuery. Once you realise what this lets you do you can do amazing things easily.
- ASP .Net WebForms is not only an abstraction over html, it is an extremely complex one. Sometimes you would get a weird bug and struggle with it for much longer than need be. In many cases you could actually see what it was doing wrong but you are unable to do anything about it. You end up doing weird workarounds.
- WebForms does not make a good technology for designers. Designers often like doing html directly. In MVC its a view, in WebForms its half a day of work.
- As the web platform is evolving fast WebForms wont keep up. Its not aware of new tags or features of HTML5, it will still render the same stuff unless you get (often) expensive 3rd party controls or wait for Microsoft to issue an update.
- Controls in WebForms limit you in so many ways. In MVC you can just grab a JQuery library and integrate it into your templates.
Sunday, March 29, 2015
ASP .Net WebForms applications /Asp.net MVC
Wednesday, January 16, 2013
Mobile captured Video not playing on server
Media Issues And Solutions
Error Description:.
We are enable to connect to the content that you are requested.We are apologise for the inconvenience.
Solution:.
MP4 videos require a MIME type on your server to play properly
If MP4 videos do not display when your Articulate content is hosted on a server, it's likely that the server is not configured to play these files.
Some servers do not have an associated MIME type to support MP4 files. To correct this issue, add an MP4 MIME type to your server. Here's how:
- Right-click the site in IIS and select Properties.
- Select the HTTP Headers Tab.
- Select File Types.
- Under the MIME Map section, select New Type.
- Type ".mp4" as the associated extension and "video/mpeg" as the content type.
- Click OK.
Tuesday, January 1, 2013
Asp.net Hidding columns with different Methods
1)
Hiding Columns using CSS:
3) Hiding Columns using Visible Property
<style type="text/css"> .hidden { display: none; } </style>
<asp:GridView runat="server" ID="gvHiddenColumnsCSS" AutoGenerateColumns="False" Caption="<b>1) using CSS</b>" CellPadding="4" BorderStyle="Solid" ForeColor="#333333" GridLines="None" BorderColor="#507CD1"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="Id" HeaderText="ID" ItemStyle-CssClass="hidden" ControlStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" /> <asp:BoundField DataField="Name" HeaderText="Name" /> </Columns> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> </asp:GridView>
Above gridview displays only Name column where as ID column will be hidden. Still, we will be able to
retrieve ID value as
string strID= gvHiddenCSS.Rows[row Index].Cells[0].Text;
2) Hiding Columns using DataKeys:
We can use Datakeys to add one or more columns which are not displayed in the GridView. Following my
previous example, We can add ID as Datakeys and remove the boundfield (ID column) from
the GridView.
<asp:GridView runat="server" ID="gvHiddenDataKeys" AutoGenerateColumns="False" CellPadding="4"
BorderStyle="Solid" ForeColor="#333333" GridLines="None" BorderColor="#507CD1"
Caption="<b>2) using DataKeys</b>" DataKeyNames="ID">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name" />
</Columns>
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
</asp:GridView>
We can retrieve ID value as
string strID=gvHiddenDataKeys.DataKeys[row index].Value.ToString();
3) Hiding Columns using Visible Property
<asp:GridView runat="server" Caption="<b>3) using Visible Property</b>" ID="gvHiddenVisible" AutoGenerateColumns="False" CellPadding="4" BorderStyle="Solid" ForeColor="#333333" GridLines="None" BorderColor="#507CD1" OnDataBinding="gvHiddenVisible_DataBinding" OnDataBound="gvHiddenVisible_DataBound"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="ID" HeaderText="ID" /> <asp:BoundField DataField="Name" HeaderText="Name" /> </Columns> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> </asp:GridView>
protected void gvHiddenVisible_DataBinding(object sender, EventArgs e) { gvHiddenVisible.Columns[0].Visible = true; } protected void gvHiddenVisible_DataBound(object sender, EventArgs e) { gvHiddenVisible.Columns[0].Visible = false; }
only
Name column where as ID column will be hidden. Still, we will be able to
retrieve ID value as
string strID=
gvHiddenCSS.Rows[row Index].Cells[0].Text;
Saturday, October 20, 2012
Restored Database/Diagrams Support/SQL-Server 2005
After restoring DB in SQL Server 2005 db most of the time I get the following error:
Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.
Solution
1. Right Click on your database, choose properties
2. Goto the Options Page
3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
4. Goto the Files Page
5. Enter "sa" in the owner textbox.
6. Hit OK
This Work for me but not work move further!!
But for some reason these steps did not work.... After googling for a while I quickly found
the following suggestion which worked just fine for me....
EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go
Saturday, August 4, 2012
Entity Framework ,Linq to Sql Issues & Solutions
Error
The type ‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced
Solution:.
Entity Framework bug can be resolved by simply add refrence to the solution file.the refence we need to add is "System.Data.Entity ".Apply by right Click on the solution file
Error
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
Solution
The Above has been found in entity framwork .To reolve this error simply copy your connectionstring from one solution to Main web config File.The error occur when we run multiple projects wihtin a project.The solution enable to read the entity connection properly.this could be resolve by the defined way
The type ‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced
Solution:.
Entity Framework bug can be resolved by simply add refrence to the solution file.the refence we need to add is "System.Data.Entity ".Apply by right Click on the solution file
Error
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
Solution
The Above has been found in entity framwork .To reolve this error simply copy your connectionstring from one solution to Main web config File.The error occur when we run multiple projects wihtin a project.The solution enable to read the entity connection properly.this could be resolve by the defined way
Thursday, March 8, 2012
Configure IIS 7.5 Some Issues and Solutions
IIS 7.5 one the Latest Addition of web server consits few of the new Features that make life easier for web developers and provide better security features and enhanced deploys then other iis versions .I am explaining step by step how to configure iss 7.5 for Vs 4.0 Asp.net applications.
Steps to Configure Asp.net Apps On IIS 7.0 and 7.5:.
There are Few things you need to fix early by click on root node of iis.
Anonymous Authentication should enable
Classic.netAppPool must have identity Local
Enable directory Browser if disable
Check on ISAPI and CGI restrictions
Configure Asp.net Compile File to IIS Virtual Directory
1- Create Virtual directory
2- Convert that directory to the Application by right click on it.
3- By Appling all these steps you can configure your Asp 4.0 app to iis 7.5
However Few of the issues has been defined with there solutions.
Issues And Solutions In IIS 7.5 Deployment:.
Error :.
Login Failed For user IISAppPoolClassic.Net Pool
It seems that new IIS version 7.5 runs its Classic .NET AppPool process with a different identity, and from there we get error "Login failed for user 'IIS APPPOOLClassic .NET AppPool'".
Solutions
go into Internet Information Services (IIS) Manager
expand node with your computer name on left side and select "Application Pools"
now in the window on the right side, right click "Classic .NET AppPool" and select "Advanced Settings..."
find "Identity" property and change its value to "LocalSystem"
By Appling the Above your Appplication will surely give the response Inshallah......
Error 2:.
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
Solution
You will usually get the error ” The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server” on IIS 7.0 if the ISAPI and CGI restriction is set on the webserver . You can solve the problem by disabling this restriction . You can do so by going to IIS manager , click on the hostname of the server , double click Isapi and CGI restrictions , click Edit Feature settings on the top right hand corner and the check the check box Allow unspecified CGI modules and Allow unspecified ISAPI modules .
Error 3:.
Server Error in Web Application
Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
Steps to Configure Asp.net Apps On IIS 7.0 and 7.5:.
There are Few things you need to fix early by click on root node of iis.
Anonymous Authentication should enable
Classic.netAppPool must have identity Local
Enable directory Browser if disable
Check on ISAPI and CGI restrictions
Configure Asp.net Compile File to IIS Virtual Directory
1- Create Virtual directory
2- Convert that directory to the Application by right click on it.
3- By Appling all these steps you can configure your Asp 4.0 app to iis 7.5
However Few of the issues has been defined with there solutions.
Issues And Solutions In IIS 7.5 Deployment:.
Error :.
Login Failed For user IISAppPoolClassic.Net Pool
It seems that new IIS version 7.5 runs its Classic .NET AppPool process with a different identity, and from there we get error "Login failed for user 'IIS APPPOOLClassic .NET AppPool'".
Solutions
find "Identity" property and change its value to "LocalSystem"
By Appling the Above your Appplication will surely give the response Inshallah......
Error 2:.
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
Solution
You will usually get the error ” The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server” on IIS 7.0 if the ISAPI and CGI restriction is set on the webserver . You can solve the problem by disabling this restriction . You can do so by going to IIS manager , click on the hostname of the server , double click Isapi and CGI restrictions , click Edit Feature settings on the top right hand corner and the check the check box Allow unspecified CGI modules and Allow unspecified ISAPI modules .
Error 3:.
Server Error in Web Application
Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
Solution:.
we will have this error when the reports where not present at source.we need check out the location where we place the publish file.Vs 2010 bydefult not attach the reports with publish file so we need to paste the .rpt files on the particular location where we have publish our application.In this way you can have access of Crystal reports through IIS.
Sunday, December 25, 2011
Sqlserver Issues ,Security Max Size(2005/2008 sql)
These are some of the Maximum Capacity Specifications for SQL Server 2008/2005 the Maximum size upto
* Database size: 524,272 terabytes
* Databases per instance of SQL Server: 32,767
* Filegroups per database: 32,767
* Files per database: 32,767
* File size (data): 16 terabytes
* File size (log): 2 terabytes
* Rows per table: Limited by available storage
* Tables per database: Limited by number of objects in a database
DataInsertion From One DataBase Column to Another DataBase Column
we need to write the following query to Insert Data from One Database column to another database column while the column name must be same in both of the tables and the datatype of the columns.
"Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)
Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item"
Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item where SupplyChaindb.dbo.SI_Item.itm_Active='1'
Debug Sqlserver Stored Procedure:.
PROCEDURE Procdebug @in INT, @out INT out BEGINIF ( @in IS NULL ) SET
@in = 0 WHILE ( @in < = 100 ) BEGIN SET @out = @in SET @in = @in + 10 PRINT CONVERT(VARCHAR, @in) + ' - ' + CONVERT(VARCHAR, @out) END END
GO DECLARE
EXEC
SELECT @out INT Procdebug 5,@out OUTPUT @out
After creating stored procedure , select the second script to debug it. After selecting press F11, screen will open sored procedure in debug mode.Keep Press the F11 Button to continue all the cycles of debuging by press the F11 button you will the overall stage values.
CREATE
AS
* Database size: 524,272 terabytes
* Databases per instance of SQL Server: 32,767
* Filegroups per database: 32,767
* Files per database: 32,767
* File size (data): 16 terabytes
* File size (log): 2 terabytes
* Rows per table: Limited by available storage
* Tables per database: Limited by number of objects in a database
DataInsertion From One DataBase Column to Another DataBase Column
we need to write the following query to Insert Data from One Database column to another database column while the column name must be same in both of the tables and the datatype of the columns.
"Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)
Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item"
Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item where SupplyChaindb.dbo.SI_Item.itm_Active='1'
Debug Sqlserver Stored Procedure:.
Create the above procedure.
PROCEDURE Procdebug @in INT, @out INT out BEGINIF ( @in IS NULL ) SET
@in = 0 WHILE ( @in < = 100 ) BEGIN SET @out = @in SET @in = @in + 10 PRINT CONVERT(VARCHAR, @in) + ' - ' + CONVERT(VARCHAR, @out) END END
GO DECLARE
EXEC
SELECT @out INT Procdebug 5,@out OUTPUT @out
After creating stored procedure , select the second script to debug it. After selecting press F11, screen will open sored procedure in debug mode.Keep Press the F11 Button to continue all the cycles of debuging by press the F11 button you will the overall stage values.
CREATE
AS
Subscribe to:
Posts (Atom)



