Tuesday, March 29, 2011

Left outer join in Linq C#


Left join Linq

from a in aa
join a in xx on a.d equals x.y into DefaultOrEmptyXDetails
from a in DefaultOrEmptyXDetails.DefaultIfEmpty()
select new a)

Wednesday, March 23, 2011

Updating multiple rows from trigger byy inserted table

Hi All
Many times we are facing that we need to change the value of Column1 of Table2 when Table1 updates.

This below is given solution by- Nipam Budhabhatti
So we need trigger.
We can either select value in some variable.
but it has problem that we cannt update all rows.
so this is the solution
by implementing it we are sure that all records in Table2 are updated after updating table1.

CREATE TRIGGER [TrgName] ON Table1
FOR UPDATE
AS
UPDATE Table2
SET
Column1 = INSERTED.Column2
FROM INSERTED
WHERE
Column3 = Column4


Nipam Budhabhatti

Nipam Budhabhatti

Friday, March 11, 2011

textbox default button

javascript:



function clickButton(e, buttonid){

var evt = e ? e : window.event;

var bt = document.getElementById(buttonid);

if (bt){

if (evt.keyCode == 13){

bt.click();

return false;

}

}

}



TextBox1.Attributes.Add("onkeypress", "return clickButton(event,'" + Button1.ClientID + "')");

Thursday, March 10, 2011

go back javascript

protected void Page_Load(object sender, EventArgs e)
{
Button2.Attributes.Add("onClick", "javascript:history.back(); return false;");
}

Explicit implement interfacess

Hi All

when we are explicitly implementing interface like..
if we have 2 interfaces which has same method; one class implements both,
then in derivced class we can not use public as access modifier to those implemented methods.

2 solve this i think we can create one wrapper method.
that method checks the type od object and according to type it will execute the method from those implemented.

I think this will help us to understand the working of interface little more.


Wednesday, March 2, 2011

some nice site

there are sites
through wich we can get sign in different font
one of such site is

http://www.mylivesignature.com/

i have used

Tuesday, March 1, 2011

Webbrowser component c#

Some times webbrrowser component of c# not working fine
its not clearing cache
so we have to do some extra logic for run that
we can find the detail code here
and we are thankful to programmer who has suggested this Answer.

Click here for the Answer.