I built an empty website on VS 2010.
Using the toolbox I put a DataGridView on my default.aspx.
Then I configured the sql query that fills it from the DataSource.
I wanted to see the ADO code that is done under the covers.
But all there is the default.aspx file, and the default.aspx.cs:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e) {}
}
this is the aspx:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataSourceID="SqlDataSource2" ForeColor="#333333"
GridLines="None" ondatabound="GridView1_DataBound">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField DataField="Title" ...
the web.config:
<configuration>
<connectionStrings...
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Where did the .designer.cs file gone?
Or maybe the aspx markup is all there is?
And if so how?
And where is the other partial class definition (if I delete the word ‘partial’ VS won’t compile and says that there is another partial class definition) ?
The other part of the class is generated from the markup (.aspx).
If you want to see the code, a quick way is to first inject an error into the code generated by the markup, using something like
<% error %>. After that, when you load the page it will report the error and give you a link you can click on to see the source code.However, from your example it looks like all the work is being done by the control, not the page itself.