Tuesday, May 7, 2013
Tuesday, April 30, 2013
Monday, April 29, 2013
Monday, December 17, 2012
Profile Picture On Masterpage Login
1.With in Register
<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
2.with in the
<div class="s4-trc-container-menu">
<div>
<SPSWC:ProfilePropertyImage PropertyName="PictureUrl" style="float: left; height: 40px;" ShowPlaceholder="true" ID="PictureUrlImage" runat="server"/>
<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
</wssuc:Welcome>
<wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
</div>
Tuesday, December 4, 2012
Hyberlink using call JavaScript Function
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnk" runat="server"
Text='<%#Eval("Title") %>' OnClientClick="javascript:return
OpenDialogbox(this);"></asp:LinkButton>
<asp:HiddenField ID="hdn" runat="server"
Value='<%#Eval("ID")%>' />
</ItemTemplate>
<HeaderTemplate>Titel</HeaderTemplate>
</asp:TemplateField>
<script language="javascript" type="text/javascript">
function OpenDialogbox(obj) {
var item = obj.id;
item
= item.replace("lnk", "hdn");
var itemid = document.getElementById(item).value;
alert('saravanan');
var options = {
url: "http://igrid108:777/_Layouts/Saravanan_Testsolutions/Edit.aspx?Itemsvalue="
+ itemid,
width: 600,
height: 300,
showClose: true,
title: "Edit Notes"
};
SP.UI.ModalDialog.showModalDialog(options);
return false;
}
</script>
Application page using javascript alert and redirect same page (refresh) script
-------------------------------------------------------------------------------
using (SPWeb oweb =
osite.OpenWeb())
{
SPList olist = oweb.Lists["Tasks"];
SPListItem oitem =
olist.GetItemById(itemidvalue);
oitem["Title"] =
TextBox1.Text;
oweb.AllowUnsafeUpdates = true;
oitem.Update();
oweb.AllowUnsafeUpdates = false;
Response.Write("<script
language='javascript' >alert('Details updated successfully!!');
parent.document.location.href=
parent.document.location.href</script>");
Some Different Ways..
---------------------
// Page.ClientScript.RegisterStartupScript(this.GetType(),
"call my function", "alertmsg();", true);
//
ClientScript.RegisterStartupScript(GetType(), "hwa",
"alert('Item saved sucessfully');", true);
//
Response.Write("javascript:return alertmsg();");
}Sunday, December 2, 2012
Bind Sharepoint 2010 List items in DropDown
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Employee"];
dropSite.DataSource = list.Items.GetDataTable();
dropSite.DataValueField = "Company";
dropSite.DataTextField = "Company";
dropSite.DataBind();
}
}
Subscribe to:
Posts (Atom)