Notes on SQLMembership Provider using the MembershipProvider Class

1. Set the tag to use “forms” in the config
2. use the reg_sql to generate the SQL tables for use with SQLMembership Provider.
3. Add 4. Can use membership.createuser(“UN”,”PW”,”Email”) to create user.
5. Methods include:Createuser, ValidateUser, DeleteUser, FinduserByName,finduserByEmail,GenPassword
6.Options to capture other user info with ProfileSystem, and defining provider properties in webconfig. Or simply adding additional tables.

 

[tester]

Table to Excel XLS code

Dim StringWriter1 As IO.StringWriter
Dim StringBuilder1 As StringBuilder = New StringBuilder
StringWriter1 = New IO.StringWriter(StringBuilder1)
Dim TextWriter1 As HtmlTextWriter = New HtmlTextWriter(oStringWriter)
label.RenderControl(oTextWriter)
Response.Clear()
Response.ClearHeaders()
Response.ContentType = “application/vnd.xls”
Response.AddHeader(“Content-Disposition”, “attachment;filename=WLMS-exlfile.xls”)
Response.Write(StringWriter1.ToString())
Response.Flush()
Response.End()

Setting the SelectedValue of RadioButtonList & DropDownList in GridView EditItemTemplate

Here is a trick one, because IntelliSense doesn’t bring up the “SelectedValue” property for a RadioButtonList, or a DropDownList in an EditItemTemplate for GridViews you may forget that “SelectedValue” is an actual property of these controls.

Here is how you can set the selected value of a RadioButtonList inside an EditItemTemplate

[codesyntax lang=”html4strict”]

<asp:TemplateField HeaderText="Payment">
<ItemTemplate>
    <asp:Label ID="lablePayment" runat="server" Text='<%#Eval("PayName")%>' />
</ItemTemplate>
<EditItemTemplate>
  <asp:RadioButtonList Runat = "server" ID="rblPaymentType" SelectedValue='<%#Eval("PayTypeID")%>'>
    <asp:ListItem Text="Check" Value="1"></asp:ListItem>
    <asp:ListItem Text="Credit Card" Value="2"></asp:ListItem>
  </asp:RadioButtonList>
</EditItemTemplate>
</asp:TemplateField>

[/codesyntax]

WebMethods For Use With Visual Studio and AJAX

The webmethod tag is an attribute added to a Public methods to indicate the method should be exposed as part of an XML Web service.  Below is an example of applying the WebMethod attribute.


<WebMethod()> _
Public Shared Function FunctionName(ByVal Parameter As String) As ObjectName
Dim ObjectName As Object = Object
Return ObjectName
End Function

The Web method can now be called via javascript on the client. Below is an example of calling the webmethod from the client.

PageMethods.FunctionName(Parameter1, onComplete, OnTimeOut, onError);

Here is a great link with additional information for web methods:

http://www.novologies.com/post/2009/05/06/Cleaner-Faster-Ajax-in-ASPNET.aspx

Microsoft Project Code Name “Velocity”

Microsoft Velocity provides distributed in-memory web application caching. This provides highly scalable, high-performance application caching. “Velocity Caching” can be used to cache any Common Language Runtime (CLR is the Virtual Machine of Microsoft’s .NET initiative) through simple API’s. From a general standpoint, Velocity was created with the goal of providing performance, scalability and availability.

The main application for providing scalable, available, high-performance applications using Velocity is by fusing the memory between multiple computers to give a single/unified cache view for the application to employ. The application can they store any CLR object that is serializable.

http://blogs.msdn.com/velocity/

Software Development: Patterns And Practices

http://msdn.microsoft.com/en-us/practices/default.aspx
http://msdn.microsoft.com/en-us/library/cc467894.aspx
http://www.codeplex.com/AppArchGuide

According to Microsoft P&P (Patterns and Practices) were created to meet the demands of architects and application developers. By following proven patterns and practices it is suggested that more sound applications will be the result. Included in P&P

  • How to design
  • Develop
  • Deploy
  • Operate architecturally sound applications on a Microsoft platform.

P&P for Web Applications
http://msdn.microsoft.com/en-us/practices/bb969054.aspx#web_apps

PHP Patterns and Practices
http://www.phppatterns.com/docs/start