Click here to Skip to main content
14,978,008 members

Michael Freidgeim - Professional Profile



Summary

    Blog RSS
25
Author
109
Authority
123
Debator
64
Enquirer
90
Organiser
456
Participant
0
Editor
No Biography provided

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralMy blog at geekswithblogs Pin
Michael Freidgeim5-Oct-05 18:26
MemberMichael Freidgeim5-Oct-05 18:26 
GeneralContains method for DataReader Pin
Michael Freidgeim6-Mar-05 18:53
MemberMichael Freidgeim6-Mar-05 18:53 
GeneralChange case to string array Pin
Michael Freidgeim13-Jan-05 14:13
MemberMichael Freidgeim13-Jan-05 14:13 
GeneralSmartNavigation and 'onload' JavaScript Pin
Michael Freidgeim6-Dec-04 14:29
MemberMichael Freidgeim6-Dec-04 14:29 
GeneralSending ASP.NET page rendered content from another ASP.NET page. Pin
Michael Freidgeim23-Sep-04 19:30
MemberMichael Freidgeim23-Sep-04 19:30 
GeneralStore JavaScript as embedded resource. Pin
Michael Freidgeim19-Sep-04 15:06
MemberMichael Freidgeim19-Sep-04 15:06 
GeneralDefault button in ASP.NET form. Pin
Michael Freidgeim15-Sep-04 18:09
MemberMichael Freidgeim15-Sep-04 18:09 
I am using my own functions to set Default Button on ASP.NET web form.
They were created based on Janus Kamp Hansen sample[^] and later using Darrell Norton's code [^].
I found that it's convinient to set the same Default Button to the container that will apply for all children- container can be WebControl or HtmlControl.
And recently I found that this approach required escaping for TextArea(otherwise Enter Key submits default button instead of entering new line in text box).
 'overloaded methods for WebControl and HtmlControl are required because common parent class Control doesn't have Attributes property
 Public Shared Sub DefaultButton(ByVal container As System.Web.UI.HtmlControls.HtmlControl, ByVal objDefaultButton As Control)
     container.Attributes.Add("onkeydown", "DefaultButton('" & objDefaultButton.ClientID & "',event);")
     container.Page.RegisterStartupScript("ForceDefaultToScript", DefaultButtonScript())
 End Sub
 Public Shared Sub DefaultButton(ByVal container As System.Web.UI.WebControls.WebControl, ByVal objDefaultButton As Control)
     container.Attributes.Add("onkeydown", "DefaultButton('" & objDefaultButton.ClientID & "',event);")
     container.Page.RegisterStartupScript("ForceDefaultToScript", DefaultButtonScript())
 End Sub
'call if container has defaultButton but child (eg textarea) doesn't need it.
 Public Shared Sub EscapeDefaultButton(ByRef ctrl As System.Web.UI.WebControls.WebControl)
     'See also DefaultButton
     ctrl.Attributes.Add("onkeydown", "NoDefaultButton(event);")
     ctrl.Page.RegisterStartupScript("ForceDefaultToScript", DefaultButtonScript())
 End Sub
 Private Shared Function DefaultButtonScript()
     'From http://dotnetjunkies.com/WebLog/darrell.norton/archive/2004/03/03/8374.aspx.
     Return JScript(ResourceToString("DefaultButton.js"))
 End Function

In this code I am using helper functions JScript and ResourceToString [^] to access embedded resources

JS function is stored in a separate file DefaultButton.js with "build Action"="embedded resource"
<!--
//Not sure that event.returnValue is applicable for Netscape
function DefaultButton(btnID, event){
 btn = findObj(btnID);
 if (document.all){
  if (event.keyCode == 13){
   event.returnValue=false;
   event.cancelBubble = true;
   btn.click();
  }
 }
 else if (document.getElementById){
  if (event.which == 13){
   event.returnValue=false;
   event.cancelBubble = true;
   btn.click();
   btn.focus();
  }
 }
 else if(document.layers){
  if(event.which == 13){
   event.returnValue=false;
   event.cancelBubble = true;
   btn.focus();
   btn.click();
  }
 }
}
//call if container has defaultButton but child (eg textarea) doesn't need it.
//Sets cancelBubble=TRUE, not tested for Netscape
function NoDefaultButton(event){
 if (document.all){
  if (event.keyCode == 13){
     event.cancelBubble = true;
  }
 }
 else if (document.getElementById){
  if (event.which == 13){
   event.cancelBubble = true;
  }
 }
 else if(document.layers){
  if(event.which == 13){
   event.cancelBubble = true;
  }
 }
}
function findObj(n, d) { 
	var p,i,x;  
	if(!d) 
		d=document; 
	if((p=n.indexOf("?"))>0 && parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=findObj(n,d.layers[i].document);
	if(!x && d.getElementById) 
		x=d.getElementById(n); 
	return x;
}
// -->


Michael

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.