1. Set the
2. use the reg_sql to generate the SQL tables for use with SQLMembership Provider.
3. Add
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.
Posts in category Software Engineering
Notes on SQLMembership Provider using the MembershipProvider Class
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
<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>Compiled Language vs. Interpreted Language
Programming languages generally fall into one of the following categories, Compiled Language or Interpreted Language. Compiled Languages are reduced to a set of machine instructions before being saved as an executable file. In general, a compiled program will execute faster thatn an interpreted program because the Interpreted program must be reduced to machine language at runtime.
Interpreted languages that code is saved in the same format and developed in. Interpreted languages offer more flexability like modifying themselves by adding or changing functions at runtime. Development time can also be reduced with interpreted languages, because the application dose not need to be compiled before each test.
In theory any language can be compiled or interpreted. The Microsoft .NET language is compiled to Common Intermediate Language (CIL) which is compiled into native machine code.
Conditional Hyperlink in template
<%
#IIf((Eval(“id”) Is System.DBNull.Value), Eval(“Last”) & “, “ & Eval(“First”), “<a href=” ../default.aspx?id=” & Eval(“id”) & “>” & Eval(“Last”) & “, “ & Eval(“First”) & “</a>”)%>
Entity Framework Links
Mozilla Development Center - https://developer.mozilla.org/en/Web_Development
MSDN – Entity Framework - http://msdn.microsoft.com/en-us/library/bb386964.aspx
Entity Framework – http://naspinski.net/post/Getting-started-with-Linq-To-Entities.aspx
MSDN – The ADO.NET Entity Framework- http://msdn.microsoft.com/en-us/data/aa937723.aspx
MSDN – .Net Framework Class Library - http://msdn.microsoft.com/en-us/library/ms229335.aspx
MSDN – Data Development Videos (Entity Framework) – http://msdn.microsoft.com/en-us/data/cc300162.aspx
MSDN – When to use Linq to SQL vs When to use Linq to Entity - http://msdn.microsoft.com/en-us/library/cc161164.aspx
Eight Entity Framework Tutorials on DataDeveloper.NET - http://thedatafarm.com/blog/data-access/eight-entity-framework-tutorials-on-datadeveloper-net/
Application Scenarios (Entity Framework) – http://msdn.microsoft.com/en-us/data/bb738689.aspx
http://code.msdn.microsoft.com/EFDocSamples2008
XtraReport Bindings
Change
Private WithEvents bindingSource1 As System.Windows.Forms.BindingSource
To
Public WithEvents bindingSource1 As System.Windows.Forms.BindingSource
Also the bindingSource Datasource needs to be changed in the report code.
Me.bindingSource1.DataSource = GetType(TypeofObject)
For the report viewer, again bind the bindingSource Datasource
Dim objects As objects objects = GetAllObjects() Dim Report1 As New XtraReport1 Report1.bindingSource1.DataSource = objects ReportViewer1.Report = Report1
Software Functional Specifications
A few good links on Functional Specifications.
http://en.wikipedia.org/wiki/Functional_specification
http://www.mojofat.com/tutorial/
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
JQuery Show Hide Div Example Tutorial
<script type=”text/javascript” language=”javascript”>
<!–
$(document).ready(function(){
$(‘#btnAddNew’).click(function(){
var isVisible = $(‘#divNew’).is(‘:visible’);
if (isVisible == false){
$(“#divNew”).animate({ height: ‘show’, opacity: ‘show’ }, ‘fast’);
} else{
$(“#divNew”).animate({ height: ‘hide’, opacity: ‘hide’ }, ‘fast’);
}
return false;
});
});
–>
</script>


