http://mosesofegypt.net/post/Simple-Static-Tooltip-Widget-using-jQueryUI.aspx
a good site for Jquery
February 24, 2009Jquery and asp.net
February 12, 2009http://www.dotnetcurry.com/ShowArticle.aspx?ID=231&AspxAutoDetectCookieSupport=1
Updating sharepoint list with security privileges
January 20, 2009when adding an item to the sharepoint list, security privileges may be required. Otherwise, it will prompt for the user name and password, on every time the page loads.
So in the following code, I am calling the function “testfunction” under security privileges
webContext = SPContext.Current.Web
SPSecurity.RunWithElevatedPrivileges(New SPSecurity.CodeToRunElevated(AddressOf TestFunction))
Then in the TestFunction, the current web can be get only by using “webContext.Site.ID”.
ie.
function TestFunction
Using site As New SPSite(webContext.Site.ID)
Dim web As SPWeb = site.OpenWeb(webContext.ID)
Dim lstColl As SPListItemCollection
——-
——
end using
end function
function to send email
January 20, 2009Public Function SendEmail(ByVal pToEmail As String, ByVal pPassword As String, ByVal pSubject As String, ByVal pBody As String) As Boolean
Dim mailMessage As New MailMessage() mailMessage.From = New MailAddress(“mail@site.com”)
mailMessage.To.Add(New MailAddress(pToEmail))
mailMessage.Subject = pSubject
mailMessage.Body = pBody
mailMessage.IsBodyHtml = True Dim client As New SmtpClient client.UseDefaultCredentials = False
client.Credentials = New System.Net.NetworkCredential(“mail@site.com”, pPassword)
client.Port = “25″
client.Host = “mail.digitise.com”
Try
client.Send(mailMessage)
Catch ex As Exception
Response.Write(ex)
End Try
End Function
Some important links: Caml query
January 12, 2009http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list
http://weblogs.asp.net/gunnarpeipman/archive/2008/10.aspx
writing caml queries to get items from sharepoint list.
To know the source of the redirection
January 10, 2009We can find from which page, it comes to the current page by the following property.
Request.UrlReferrer.AbsoluteUri
string formatting, to determine the number of decimal places etc
December 31, 2008http://blog.joggee.com/?p=37
asp.code to get current page url and other properties
December 24, 2008Check the url:
http://www.xcess.info/request_url_parameters_details_asp_net_aen.aspx
Getting the items from Sharepoint list using CAML query
December 18, 2008Dim web As SPWeb = SPContext.Current.Web
Dim ListItmCol As SPListItemCollection
Dim query As New SPQuery
Dim queryString As New StringBuilder
query.ViewFields = “<FieldRef Name=’” + Thumbnail + “‘/><FieldRef Name=’” + NormalSize + “‘/><FieldRef Name=’” + ZoomGraphics + “‘/><FieldRef Name=’” + AltText + “‘/>”
queryString.Append(“<Where><Eq><FieldRef Name=’ProductID_s’ /><Value Type=”"Text”">” + pid.ToString + “</Value></Eq></Where>”)
query.Query = queryString.ToString()
If Not web.Lists(Me.ImageListName) Is Nothing Then
ListItmCol = web.Lists(Me.ImageListName).GetItems(query)
End If
If Not ListItmCol Is Nothing Then
dtable = DirectCast(ListItmCol.GetDataTable, DataTable)
End If
To add the html part on the asp.net code file in custom control
December 17, 2008Protected Overrides Sub RenderContents(ByVal output As HtmlTextWriter)
Dim sb1 As StringBuilder = New StringBuilder()
Dim sb2 As StringBuilder = New StringBuilder()
sb2.Append(“<body onload=”"rotate()”">”)
sb2.Append(“<img src=”"”" id=”"hai”"”)
sb2.Append(“>”)
sb2.Append(“</body>”)
output.AddAttribute(“xmlns”, “http://www.w3.org/1999/xhtml”)
output.RenderBeginTag(“html”)
output.AddAttribute(“runat”, “server”)
output.RenderBeginTag(“head”)
output.Write(sb1.ToString())
output.RenderEndTag()
output.Write(sb2.ToString())
output.RenderEndTag()
End Sub