The Blog of Travis Gneiting
  • Home
KEEP IN TOUCH

Posts in category Software Engineering

Notes on SQLMembership Provider using the MembershipProvider Class

Nov15
2011
Leave a Comment Written by admin

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.

Posted in Membership

Table to Excel XLS code

Nov15
2011
Leave a Comment Written by admin

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()

Posted in ASP.NET

Setting the SelectedValue of RadioButtonList & DropDownList in GridView EditItemTemplate

Jun19
2011
Leave a Comment Written by admin

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

Source code   
<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>
Posted in ASP.NET

Compiled Language vs. Interpreted Language

Feb07
2011
Leave a Comment Written by admin

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

Jan11
2011
Leave a Comment Written by admin

<%

#IIf((Eval(“id”) Is System.DBNull.Value), Eval(“Last”) & “, “ & Eval(“First”), “<a href=” ../default.aspx?id=” & Eval(“id”) & “>” & Eval(“Last”) & “, “ & Eval(“First”) & “</a>”)%>

Posted in ASP.NET

Entity Framework Links

Feb04
2010
Written by admin

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

Posted in Uncategorized

XtraReport Bindings

Feb04
2010
Written by admin

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
Tagged DevExpress

Software Functional Specifications

Feb24
2009
Written by admin

A few good links on Functional Specifications.

http://en.wikipedia.org/wiki/Functional_specification

http://www.mojofat.com/tutorial/

Tagged Functional, Specification

WebMethods For Use With Visual Studio and AJAX

Jan05
2009
Written by admin

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

Posted in ASP.NET, Javascript - Tagged ASP.NET, webmethod

JQuery Show Hide Div Example Tutorial

Nov06
2008
Written by admin

<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>

Posted in Javascript - Tagged ASP.NET, Javascript, JQuery
« Older Entries

Programming

  • ASP.NET
  • MSDN
  • Visual Studio Offical Website
  • www.w3.org

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Welcome to My Programming Blog

This is my brain dump. I use it to post thing I may use again, interesting things I have run into and programming helps.

Tags

.net Agile Software Development Engineering ASP.NET attack Beginner Blueprint CSS Database Deployment DevExpress Framework Functional hacked Hotmail How to test software HTTP IIS Javascript JQuery MIME New Website Checklist PHP querystring Software Testing Specification spoof Status Codes Testing Trace Debug ASP.NET Tutorial Velocity webmethod Website Testing Zend

Blog Archive

  • January 2012
  • November 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • February 2011
  • January 2011
  • November 2010
  • October 2010
  • August 2010
  • July 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • February 2009
  • January 2009
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • April 2008

EvoLve theme by Theme4Press  •  Powered by WordPress The Blog of Travis Gneiting