Posts

Showing posts from April, 2013

Sharepoint 2010: Enable Anonymous: All The Errors And Problems (i hope)

Image
so i started working is SP, yey me!! yesterday we wanted to set the Anonymous Extension and it didnt work!! so thx to our DEAR Team Leaders Eran and Assaf!! the begining - u dont need me for that, so many tutorials lets just sum it: Central Admin, Manage Web App, Authentication Providers, Default, Enable Anonymous Access. Anonymous Policy - No Policy. the issue: Site Settings => Site Permissions => Anonymous Access: you dont see it!! solutions: 1. are you on your admin site or on the anonymous site? you can only set and see that on the anonymous site. 2. hey wait - i am on the anonymous site and cant get in to the administrative part! cant log in!, well that obvious, its anonymous access, go to IIS, ur site, Authentication and enable Windows Authentication. dont forget to disable that in the end. 3. copy ur admin web.config to ur anonymous site web.config, there r many permissions there that dont let u do administrative stuff. later learn that and harden security, or...

Jquery UI autocomplete with Ajax: master

stage 4: master sometimes you would like to do more, usually with the _renderItem, lets see that $( function () {   $.ui.autocomplete.prototype._renderItem = function (ul, item) {     return $( "<li></li>" )       .append( "<a>" + item.name + " <br><span style='background-color:blue'> " +  item.time + "</span><br>" + item.id + "</a>" )       .append( "<a href='default.aspx'>go go go</a>" )       .appendTo(ul);   };                 $( "#MyTextBox" ).autocomplete({     source: function (request, response) {       $.ajax({         url: "Handler1.ashx" ,         dat...

Jquery UI autocomplete with Ajax: the advanced stage

stage 3: advanced so we have a few cool functions with this autocomplete. 1st thing is that we can return complex data, say we return an object: class AnObject {   public int ID { get ; set ; }   public string Name { get ; set ; }   public DateTime CreationTime { get ; set ; } } public void ProcessRequest( HttpContext context) {   List < AnObject > l = new List < AnObject >();   l.Add( new AnObject () { ID = 1, Name = "space marine" , CreationTime = DateTime .Now });   l.Add( new AnObject () { ID = 2, Name = "galaxy cow" , CreationTime = DateTime .UtcNow });   l.Add( new AnObject () { ID = 3, Name = "dimention cat" , CreationTime = DateTime .Today });   l.Add( new AnObject () { ID = 4, Name = "big bad zerg" , CreationTime = DateTime .Now.AddDays(3) });   l.Add( new AnObject () { ID = 5, Name = "psychic being" , Creat...

Jquery UI autocomplete with Ajax: the novice stage

stage 2: novice we will try to understand that thing a bit with our own server side. add new item, choose Generic Handle, th filename will be Handler1.ashx. paste this: public void ProcessRequest( HttpContext context) {   context.Response.ContentType = "text/plain" ;   JavaScriptSerializer jss = new JavaScriptSerializer ();   var x = new string [] { "ariel" , "avraham" , "aviel" , "eliyahu" , "eliezer" };   context.Response.Write(jss.Serialize(x)); } client side paste this $( function () {   $( "#MyTextBox" ).autocomplete({ source: "Handler1.ashx" }); }); yep, the autocomplete source can get a pure handler. try it and see that we now have our own handler, now lets make it ajax with server side filter, start with asking for the same data but with the filter function $( "#MyTextBox" ).autoc...

Jquery UI autocomplete with Ajax: the idiotproof to master full guide

i decided to write this post cuz this thing tool my like an hour or 2 to get, and while looking at my solution i saw i should have got it in 2 seconds, so like other places sometime the examles are just not simple enough, so lets go. stage 1: idiot proof i'll do everything from the begining, download jquery ui 1.9.2 from their site. i opened an empty asp.net web app, added the jquery-ui-1.9.2.custom.js and the jquery-1.8.3.js and write html: < input id ="MyTextBox" type ="text" /> and then JS: $( function () {   $( "#MyTextBox" ).autocomplete({     source: [ "ariel" , "avraham" , "aviel" , "eliyahu" , "eliezer" ]   }); });   and run, thas it u have a working auto complete. now in order to have my array from a request i could just do this: $.ajax({   url: "default.aspx/BringMeListFromWebMethod" ,   contentType: ...