Click here to Skip to main content
14,936,944 members

Comments by mhamad zarif (Top 160 by date)

mhamad zarif 23-Feb-14 12:39pm View
   
Hi, i meant through a .net web service or wcf or MVC actions that return json result. What is the best to use.
mhamad zarif 24-Jun-12 5:04am View
   
Do u mean that u want to insert it at the beginning ?
mhamad zarif 15-Feb-12 15:39pm View
   
what do u mean by : Sounds like the interview process should have gone better?
mhamad zarif 11-Feb-12 16:01pm View
   
Thank you for your help my friend. Actually this code is what i saw in my new job that i told you about and it is not generating any error at all even when i debug the code. And my problem was is that the master is an object of type Event and iam doin me.Bmd=master so how it is not generating any error. Anyway i reel that i will not be able to stay at this job because they have a very high level and works oop in a hard way other than the way i do. Please give me an advice. You know how much i do trust you.
mhamad zarif 11-Feb-12 11:25am View
   
Also the master object is of type Events.
mhamad zarif 11-Feb-12 11:22am View
   
But it is not giving me any error
mhamad zarif 11-Feb-12 10:17am View
   
thanks, but my problem is that how it is assigning and object of type Events to BMD ? knowing that when i debug the code, the master is appearing to be of type BMD which is confusing me.
mhamad zarif 1-Feb-12 16:15pm View
   
thank you :)
mhamad zarif 1-Feb-12 14:40pm View
   
Oh.. i just tried what you did by putting new instead of override in the derived class but it generated an error. Didn't it generate an error for you.
mhamad zarif 1-Feb-12 14:37pm View
   
I am surprised that we can use new with abstract also ! but logically i dont see it good, since and abstract method has no code and it should be overridden logically but it seems that the logic of abstract method is not well applied in the syntax that c# is giving. I think that it should generate an error when using new with abstract method. What is your opinion ?
mhamad zarif 1-Feb-12 14:25pm View
   
Those days i am so interested in oop, since i am moving to a big company for the first time in my life and they work on oop. So iam gaining knowledge in its principles(poymorphism,abstraction,encapsulation,inheritance),and i managed to understand everything, but i still have a problem in designing my classes reflecting my tables in database.So i think when i staart working i will gain this knowledge.
mhamad zarif 1-Feb-12 14:22pm View
   
Deleted
I am surprised that we can use new with abstract also ! but logically i dont see it good, since and abstract method has no code and it should be overridden logically but it seems that the logic of abstract method is not well applied in the syntax that c# is giving. I think that it should generate an error when using new with abstract method. What is your opinion ?
mhamad zarif 1-Feb-12 13:34pm View
   
thank you. I always try to search the internet and come out with results by myself but sometimes i need the help of experts to make sure that what i deduced was correct.
mhamad zarif 1-Feb-12 13:34pm View
   
ah OK. My bad i did not know that it means this. But at the end off course you deserved what i said with no doubt.
mhamad zarif 1-Feb-12 13:26pm View
   
Deleted
thank you. I always try to search the internet and come out with results by myself but sometimes i need the help of experts to make sure that what i deduced was correct.
mhamad zarif 1-Feb-12 13:20pm View
   
why are you saying to me shameless flatterer ?
mhamad zarif 1-Feb-12 13:14pm View
   
Thank you very much. You made it crystal clear as Pete O'Hanlon did(look up please). I always learn from you SAKryukov. You are just and simply great !
mhamad zarif 1-Feb-12 12:45pm View
   
thanks :)
mhamad zarif 1-Feb-12 12:01pm View
   
After further reading i deduced the following : Virtual method is a method that has implementation and it "can" be overridden in child class(not necessarily overridden).While abstract method has no implementation and it "must" be overridden in child class. Also abstract methods are only declared in abstract class while virtual can be declared in any class(abstract or not).And i cant override a method that is neither virtual nor abstract.Finally i use hiding when a method in parent class is neither abstract nor virtual in order to have different implementation in child class. Do you agree ?
mhamad zarif 1-Feb-12 11:35am View
   
Deleted
In your answer you said that i should override both virtual and abstract, so if yes what do they differ from each other ?. Also i am so much confused about hiding, so cant i hide a virtual method ? or i just hide a normal method that is neither virtual nor abstract ?
mhamad zarif 8-Jan-12 8:40am View
   
thanks. please can you answer the second part of my question ?
mhamad zarif 29-Dec-11 9:05am View
   
do as he said and everything will be fine. my 5.
mhamad zarif 28-Dec-11 3:18am View
   
Deleted
Reason for my vote of 5
I always use what you mentioned. my 5.
mhamad zarif 26-Dec-11 13:33pm View
   
iam ready to do this website for you if you paid good.
mhamad zarif 18-Dec-11 4:41am View
   
i have used datalist inside a datalist for comments. Its not that big deal.
mhamad zarif 11-Dec-11 6:53am View
   
5
mhamad zarif 7-Dec-11 17:10pm View
   
i have passed through this. Never listen to them. They will know that they are wrong when you find a job. I am from Lebanon and you are from Egypt and we know that o find a work in arab countries it is not easy.
mhamad zarif 26-Nov-11 13:04pm View
   
my 5. This is the solution.
mhamad zarif 20-Nov-11 14:57pm View
   
oh thanks man for the link,but actually i made this solution depending on this and other articles.Anyway thanks for googling.
mhamad zarif 19-Nov-11 16:24pm View
   
wow thanks.I posted that question on asp.net site,so thanks for getting it here.You helped a lot.
mhamad zarif 19-Nov-11 7:56am View
   
oh. I thought i could,since i wanted to let a trigger call a stored procedure that can send some parameters to asp.net function.
mhamad zarif 16-Nov-11 9:05am View
   
Deleted
yeah
mhamad zarif 10-Nov-11 6:32am View
   
inside what event are you putting this code ?
mhamad zarif 7-Oct-11 3:15am View
   
it did not work.
mhamad zarif 2-Oct-11 16:08pm View
   
i dont really know how people vote on code project.What is wrong on my question to come and see that someone voted with 1 ?
mhamad zarif 2-Oct-11 8:01am View
   
thanks. :)
mhamad zarif 1-Oct-11 4:25am View
   
reason for my reply : I googled it and went to microsoft site,but i felt soo much confused since there is more than one thing to install.
mhamad zarif 28-Sep-11 9:14am View
   
Deleted
Reason for my vote of 1
not good
mhamad zarif 21-Sep-11 14:14pm View
   
I defined the input and output inside the function and they are working well.But still the filepath is not working,since it is using server.mappath:

Dim filePath As String = Server.MapPath("~/HtmlTemplates/PartnersTemplate.htm")
mhamad zarif 5-Sep-11 8:11am View
   
i have already read this article.But scott is not saying how to make rewriting for dynamic data from database.But he is only saying how to put them if he already knows the query string.
mhamad zarif 3-Sep-11 12:35pm View
   
no this will not work with what iam doing.I need ever element to be in its own div.
mhamad zarif 3-Sep-11 10:06am View
   
sorry but it did not help me.Anyway thank you for your kindness.I will quit and accept the style that asp.net is giving me.

my 5 for your help .
mhamad zarif 3-Sep-11 9:47am View
   
i think that the problem is that every input must be surrounded by the div.Is that true?and if yes how can i make sure that all inputs are surrounded by this div ?
mhamad zarif 3-Sep-11 9:41am View
   
here is the html generated at runtime :


<div>
<div class="checkbox" id="Cooking">
<table id="ctl00_ContentPlaceBody_CheckBoxListAnswer" border="0">
<tr>
<td><input id="ctl00_ContentPlaceBody_CheckBoxListAnswer_0" type="checkbox" name="ctl00$ContentPlaceBody$CheckBoxListAnswer$0" /><label for="ctl00_ContentPlaceBody_CheckBoxListAnswer_0">Good</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceBody_CheckBoxListAnswer_1" type="checkbox" name="ctl00$ContentPlaceBody$CheckBoxListAnswer$1" /><label for="ctl00_ContentPlaceBody_CheckBoxListAnswer_1">Bad</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceBody_CheckBoxListAnswer_2" type="checkbox" name="ctl00$ContentPlaceBody$CheckBoxListAnswer$2" /><label for="ctl00_ContentPlaceBody_CheckBoxListAnswer_2">Not bad</label></td>
</tr>
</table>
</div>
</div>
mhamad zarif 3-Sep-11 9:39am View
   
Deleted
please can you tell me how to do this ?
mhamad zarif 3-Sep-11 9:31am View
   
ok i have used this one : http://blogs.digitss.com/javascript/jquery-javascript/jquery-fancy-custom-radio-and-checkbox/

and this is what i did in the html :

<div>
<div class="checkbox" id="Cooking">
<asp:CheckBoxList ID="CheckBoxListAnswer" runat="server">

</div>
</div>
But it is only showing the effect on the first item in the checkbox list and the others items are only displaying the text .So what is wrong ?
mhamad zarif 3-Sep-11 8:55am View
   
Deleted
Reason for my vote of 1
An old tip.
mhamad zarif 2-Sep-11 16:42pm View
   
So the scenario is in this way : i write a webservice.And then i write a wcf to allow people from other sites to use my webservice by giving them access to a certain web method in my webservice.Is that true ?
mhamad zarif 2-Sep-11 16:32pm View
   
So the scenario is in this way : i write a webservice.And then i write a wcf to allow people from other sites to use my webservice by giving them access to a certain web method in my webservice.Is that true ?
mhamad zarif 1-Sep-11 9:09am View
   
yes and the email is being sent.I put this msg.IsBodyHtml = True but it is still sending them as html tags.please help.I have been searching for this a long time.
mhamad zarif 1-Sep-11 4:52am View
   
there is no exceptions generated.I debugged the code 10's of times.But i have this in the create user wizard,so is it causing the problem :
please look down:
mhamad zarif 1-Sep-11 4:48am View
   
The email is being received.But always this error is showing.
mhamad zarif 1-Sep-11 4:14am View
   
i specified the to but it did not work.Please help me.
mhamad zarif 1-Sep-11 3:50am View
   
This code is inside sending email event for create user wizard.So the email address to is specified automatically.Isn't it ? please help me.I have been facing this problem since 3 days.And i am not able to finish my website due to this error.
mhamad zarif 1-Sep-11 2:03am View
   
please can you give me reasons for why i should not use it ?
mhamad zarif 31-Aug-11 15:07pm View
   
please look at my code down.
mhamad zarif 31-Aug-11 15:06pm View
   
i want to use the dataset as datasource.Since i am planning to add items to the datalist when user scroll down(like facebook).So i have done the scroll down issue,but in the web method it is calling i am returning a new dataset that has the more items to a javascript function.So i want in this javascript function to change the datasource of the datalist to this returned dataset.
mhamad zarif 31-Aug-11 8:04am View
   
Deleted
Reason for my vote of 5
i agree.
mhamad zarif 30-Aug-11 16:20pm View
   
ok my question is related to sending confirmation email when users registers in asp.net using the create user wizard.Here is the code to my question. http://www.codeproject.com/Questions/247491/Asp-net-Sending-email-through-gmail-smtp-error
mhamad zarif 30-Aug-11 16:13pm View
   
ok thanks now i understood what is the problem.Since i know that you are generous and one of the best helpers on code project,i want to ask for your help about a problem that i have been facing since 3 days.So can you help me ?
mhamad zarif 30-Aug-11 16:09pm View
   
Deleted
it seems that you can know what is my problem.So please can you tell me what is my mistake ?
mhamad zarif 30-Aug-11 16:08pm View
   
First of all thanks for your help.Second,i am new to the field of asp.net.And i am trying to make some exercises and this is one of them.BTW,i still did not understand why was the problem firing.Please can you tell me where was the problem?and what do you mean by :"This is because System.Web.IHttpModule inherited from System.IDisposable. The rules for implementation of interfaces require that you implement System.IDisposable.Dispose()" ?
mhamad zarif 30-Aug-11 4:45am View
   
Thanks. for your help.But actually the last thing that i care about now is spams.Le my email burn.I only care now about solving this problem before getting fired.So please and since you have a great experience.Can you help me in solving this problem ?
mhamad zarif 30-Aug-11 4:26am View
   
Deleted
hey man.This is vb.net and not c#.In vb.net we use only sing equal for comparison.I think that you should read a little bit more about programming in vb.net.
mhamad zarif 29-Aug-11 5:41am View
   
I already did that.Please check the code again.
mhamad zarif 29-Aug-11 3:14am View
   
Thanks for help.But it did not solve the problem.
mhamad zarif 27-Aug-11 17:16pm View
   
Are you offering a job for freelancer or what ?.Man this is not a way for asking.What did you try ? No one can help you if you did not help your self first.
mhamad zarif 16-Aug-11 16:30pm View
   
this is my markup that is adding the item :

<asp:LoginView ID="LoginView2" runat="server">
<rolegroups>
<asp:RoleGroup Roles="Members">
<contenttemplate>
<a href="~/Members/CustomersList.aspx" id="A44" runat="server">
<img id="Img4" runat="server" alt="Profle" width="160" height="59" border="0" src="/images/profile.jpg"
onmouseover="this.src='/images/profile_hover.jpg'" önmouseout="this.src='/images/profile.jpg'" />


<asp:RoleGroup Roles="Anonymous">
<contenttemplate>
<a href="~/Login.aspx" id="A15" runat="server">
<img id="Img4" runat="server" alt="Login" width="160" height="59" border="0" src="/images/Login.jpg"
onmouseover="this.src='/images/Login-hover.jpg'" önmouseout="this.src='/images/Login.jpg'" />



mhamad zarif 9-Aug-11 13:15pm View
   
is text1 has runat=server ?
mhamad zarif 8-Aug-11 12:16pm View
   
shouldn't he use buttonID.clientID ? since it has runat=server.
mhamad zarif 7-Aug-11 16:13pm View
   
thanks for the links and for your answer.I am always happy to hear advice from experts like you. my 5.
mhamad zarif 2-Aug-11 6:03am View
   
i am sure about his name.He is the writer of ultra fast book.I dont remember the article name.
mhamad zarif 1-Aug-11 6:35am View
   
tried it but still not working.I am putting alerts and they are not firing which means that the code is not running
mhamad zarif 30-Jul-11 17:08pm View
   
thanks a lot.Now i understood the concept.
mhamad zarif 30-Jul-11 14:10pm View
   
my 5.It was a solution for my problem.thanks you.
mhamad zarif 30-Jul-11 14:09pm View
   
It is working like magic ! thank you my friend.
mhamad zarif 28-Jul-11 9:42am View
   
please can you tell me from where to start in writing the javascript code
mhamad zarif 28-Jul-11 9:03am View
   
Thanks for your help but it is not working .Please help me,i have to finish the website today.
mhamad zarif 23-Jul-11 2:21am View
   
Please show us your code to help you.
mhamad zarif 22-Jul-11 16:23pm View
   
did you see his answer.? Wow i cant believe it.
mhamad zarif 22-Jul-11 7:59am View
   
what did you try ?
mhamad zarif 22-Jul-11 4:22am View
   
your welcomed
mhamad zarif 21-Jul-11 8:47am View
   
Ok lets suppose that i have added this column and modified my stored procedures.How can i translate the fields that are in english to another language when requested ?
mhamad zarif 21-Jul-11 8:46am View
   
thank you.But i know about this.My question is not how to make globalization.But is how can i find a way to translate that values in the database that are in english to another language when requested.
mhamad zarif 18-Jul-11 3:00am View
   
Thanks for voting.I appreciate it.!
mhamad zarif 18-Jul-11 2:44am View
   
so what ? this is not a vb code.This is java script which is unified ! try it and see it working.
mhamad zarif 17-Jul-11 7:27am View
   
great links.my 5.
mhamad zarif 16-Jul-11 11:44am View
   
never let your boss control your personality.Just explain to him that this need time !
mhamad zarif 16-Jul-11 7:11am View
   
watch this video.it helps a lot.

http://www.youtube.com/watch?v=z0Txt4UESg4
mhamad zarif 15-Jul-11 2:44am View
   
If you dont want to use sessions then i think that you can use application for example which also can transfer objects between pages.
mhamad zarif 9-Jul-11 12:40pm View
   
Veryy good links. my 5.
mhamad zarif 9-Jul-11 5:57am View
   
very nice link, my 5.
mhamad zarif 8-Jul-11 17:40pm View
   
Please visite the outdoormedia page in chrome and see how the gridview header is appearing.While in IE it is great.
mhamad zarif 8-Jul-11 17:34pm View
   
offcourse it is not advertising.I dont care about this company.I am a programmer.To see the differences please try yo visit the out door media page in cgrome and see for example how the gridview header is appearing bad.But on IE it is perfect.
mhamad zarif 6-Jul-11 8:54am View
   
Nice Link.And for ssabitra.I wanna tell you that this is an easy part so dont panic.!
mhamad zarif 6-Jul-11 8:51am View
   
Make sure that the script manager is added before anything else is added.
mhamad zarif 6-Jul-11 8:50am View
   
Deleted
I wish to see your code since this is working for me
mhamad zarif 6-Jul-11 8:50am View
   
I wish to see your code since this is working with me
mhamad zarif 5-Jul-11 4:23am View
   
Actually this is happening online.Since i already put the website online for testing.But when i was testing it in visual studio this was not happening.
mhamad zarif 5-Jul-11 4:04am View
   
Hi,i put the timeout to 6o but still having the same issue
mhamad zarif 5-Jul-11 3:58am View
   
Deleted
Thanks for the help.But in session state in web.config i did not specify time so by default it should take 20 minutes.Is not that true ?
mhamad zarif 1-Jul-11 3:15am View
   
Great Solution but where to set the passsword ?
mhamad zarif 26-Jun-11 4:21am View
   
I want to know from where to start.Sorry for the inconvenience between the title and the content.
mhamad zarif 25-Jun-11 15:55pm View
   
please check this and see how much it is great :

http://www.wibiya.com/
mhamad zarif 25-Jun-11 15:54pm View
   
Look also what i found.Do you think it is good to use ?

http://www.wibiya.com/
mhamad zarif 25-Jun-11 15:50pm View
   
It is giving me this error when i press the connect button :

Invalid API key specified
mhamad zarif 25-Jun-11 15:50pm View
   
thanks for your help my friends.
mhamad zarif 25-Jun-11 15:49pm View
   
Thanks for the help.
mhamad zarif 25-Jun-11 15:40pm View
   
what about facebook connect? and how can this have a relation with roles and profiles in asp.net ?
mhamad zarif 21-Jun-11 11:52am View
   
Thanks that was great.So role is what users can access and profile is what he can do on the web.Right ?
mhamad zarif 21-Jun-11 11:50am View
   
Deleted
Thanks that was great answer.So roles are what users can access when logged in or not.While profiles is only for logged in users right ?
mhamad zarif 18-Jun-11 6:38am View
   
nothing worked please help
mhamad zarif 17-Jun-11 13:46pm View
   
i know that cms help in filling the content of the website and updating it.So what do you advice me ?
mhamad zarif 14-Jun-11 14:37pm View
   
yeah Marcus there is a contradiction.But i like to program when someone teach me something.i.e i love when sitting and programming c++ since i took it in the university,but i am bored when learning something new alone.So this is the reason behind my question.I want to find the mus unboring way to study new technology.
mhamad zarif 14-Jun-11 14:34pm View
   
always the best answers.Thank you my friend.I hope that i can contact you and have your email.It will be an honor for me.
mhamad zarif 14-Jun-11 14:27pm View
   
hello my friend SAKryukov i am happy that you joined this conversation.I know that with this attitude i can go nowhere and i am trying to change it knowing that i love programming so much but i am bored when learning it.
mhamad zarif 14-Jun-11 14:23pm View
   
I dont know why i just feel bored of books.I start reading and trying to enjoy it but i simply quit after some time.
mhamad zarif 14-Jun-11 14:21pm View
   
that is what i also think.Writing code is the best way to learn.
mhamad zarif 14-Jun-11 14:19pm View
   
Thanks for your help.I know that you are a great programmer by following you on code project.So i want to tell you if you advice me to study theoretically i.e books and tutorials or by start doing a website and learn something when i want to do it by googeling it ? since i really feel so bored if i sit and study books.
mhamad zarif 12-Jun-11 13:58pm View
   
yeah i want to disable the maximize button.I am not using the swf on a web page.
mhamad zarif 12-Jun-11 11:48am View
   
yeah i tried a lot but nothing worked .
mhamad zarif 6-Jun-11 4:16am View
   
thanks for the answer.But i have one last question : which zend should i download .? They are offering minimal package and .... so which one i choose ?
mhamad zarif 6-Jun-11 3:33am View
   
i already have wamp5.So if i downloaded zend framework hoe can i make it work with wamp5 ?
mhamad zarif 5-Jun-11 13:56pm View
   
I will call again for sure.Beginners like me always need the help of professional like you.
mhamad zarif 5-Jun-11 5:38am View
   
it seems that i have downloaded the old one. I found now that the correct one to download is facebook c# sdk . Thanks for ur help my friend.
mhamad zarif 5-Jun-11 5:20am View
   
this one

http://msdn.microsoft.com/en-us/library/bb932386.aspx
mhamad zarif 5-Jun-11 5:09am View
   
Thanks for the help my friend i did it and it is ok.But iam having a new problem which is that ia m trying to follow a tutorial on msdn and they are using the facebook service and they are writing : facebookService1.Secret. But my problem is that secret is not found and it is also saying that i must add a reference so what reference should i also add ?
mhamad zarif 5-Jun-11 4:28am View
   
Thank you very much my friend.It was a great help,and programming is great because of people like you.
mhamad zarif 4-Jun-11 13:09pm View
   
actually i dont have specific thing to do.But all what i want is that i want to start learning php .
mhamad zarif 29-May-11 4:51am View
   
Thanks for your help,but is dotnetnuke free ?
mhamad zarif 26-Apr-11 9:22am View
   
Thanks a lot it worked.
mhamad zarif 26-Apr-11 8:39am View
   
yeah jim,initially the code was with no "IsPostBack" and it was no working also.Please if you can help me fix this issue since i need it.Thanks for your reply.
mhamad zarif 22-Apr-11 7:41am View
   
Thanks for the link man.From what i understood from this article is that css adapter is used to change the way the server control is presented in html.is that true ?
mhamad zarif 20-Apr-11 3:05am View
   
Thanks for your help.It is working great !
mhamad zarif 16-Apr-11 13:56pm View
   
Thanks for your help.I downloaded the source code but it is not working . Did it work with you ?
mhamad zarif 25-Feb-11 14:53pm View
   
Hi Pankaj,i followed what you said but it is still not working and those are my modifications :

SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
client.EnableSsl = true;

// Add credentials
client.Credentials = new System.Net.NetworkCredential("ahmad.bastas@gmail.com", "parking11");
client.UseDefaultCredentials = false;
mhamad zarif 25-Feb-11 10:23am View
   
Thanks for your help Sandeep.But please iam a beginner and i dont know how to know how to check the proper security permissions in smtp and firewall permissions.Please help me,iam using windows 7.please help me,i need to solve this problem as fast as i can.Thanks in advance.
mhamad zarif 25-Feb-11 10:08am View
   
Deleted
what do you mean by this ?
mhamad zarif 6-Feb-11 5:21am View
   
Thanks for your help,but regarding the reffering to the jquery in page header,do u know how to do it ?
mhamad zarif 26-Jan-11 16:33pm View
   
Thanks for your help.I appreciate it.
mhamad zarif 26-Jan-11 16:15pm View
   
Thanks for your kind help.But i have one question.When i add Shockwave Flash Object,how can i give it the url of the swf file ?
mhamad zarif 26-Jan-11 15:18pm View
   
I am really so surprised.How my code is working with yo and not working with me.
mhamad zarif 26-Jan-11 14:45pm View
   
How did you do this man ? i mean what did you use to make this google scrren appears ?
mhamad zarif 26-Jan-11 14:30pm View
   
Actually no error is generated.I am simply typin characters in the textbox but not getting suggestions,while when testing it in IE,iam gettin suggestions.But when you tested my code it worked in chrome or not ?
mhamad zarif 26-Jan-11 13:48pm View
   
Deleted
Hi,i pasted my code up so i hope that you check it please.Thanks in advance.
mhamad zarif 26-Jan-11 13:45pm View
   
Hi,i pasted my code up so i hope that you check it please.Thanks in advance.
mhamad zarif 26-Jan-11 13:44pm View
   
Deleted
Please check the code.I pasted up.Thanks in advance.
mhamad zarif 26-Jan-11 11:40am View
   
Deleted
This is my code:

in Html:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>





<title>Untitled Page



<asp:toolkitscriptmanager id="ScriptManager2" runat="server" enablepartialrendering="true">
<services>
<asp:servicereference path="DataService.asmx">




<asp:textbox id="TextBox1" runat="server">
<asp:autocompleteextender behaviorid="AutoCompleteExtenderBehaviour" id="TextBox1_AutoCompleteExtender" runat="server"
="" minimumprefixlength="1" completionsetcount="10" delimitercharacters="" showonlycurrentwordincompletionlistitem="true" enabled="True" servicepath="DataService.asmx" targetcontrolid="TextBox1" servicemethod="GetCities">
<animations>
<onshow>
<sequence>
<hideaction visible="true">
<fadein duration=".50" fps="10">


<onhide>
<sequence>
<hideaction visible="true">
<fadeout duration=".50" fps="10">
















And in webservice :

using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data;
using System.Collections.Generic;

[WebService(Namespace = "http://temf.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class DataService : System.Web.Services.WebService {

public static IList<string> _cityList;
public DataService () {

//InitializeComponent();
}

[WebMethod]
public string[] GetCities(string prefixText, int count)
{

//Gets the city list
IList<string> cityList = GetCityData();

//using linq to select the cities based on the prefix text
var result = from city in cityList.AsEnumerable()
where city.ToUpper().StartsWith(prefixText.ToUpper())
select city;
//return the result as a string[] by taking only the top n
return result.Take(count).ToArray<string>();
}
private IList<string> GetCityData()
{
if (_cityList == null)
{
CreateCityList();
}

return _cityList;
}
private static void CreateCityList()
{
_cityList = new List<string>();
_cityList.Add("Boston");
_cityList.Add("NewYork");
_cityList.Add("California");
_cityList.Add("New Jersey");
_cityList.Add("Denver");
_cityList.Add("Detroit");
_cityList.Add("Idaho");
_cityList.Add("Ohio");
_cityList.Add("Los Angeles");
_cityList.Add("Las Vegas");
_cityList.Add("Philadelphia");
_cityList.Add("Phoenix");
_cityList.Add("San Antonio");
_cityList.Add("San Diego");
_cityList.Add("Dallas");
_cityList.Add("San Jose");
_cityList.Add("San Francisco");
_cityList.Add("Columbus");
_cityList.Add("Seattle");
_cityList.Add("Washington");
_cityList.Add("Oklahoma City")
mhamad zarif 25-Jan-11 15:08pm View
   
Thanks for your help,but is there another way to solve this problem ? since i must what iam doing and i do not have enough time to study new technologies.Thanks in advance.
mhamad zarif 25-Jan-11 6:29am View
   
Dear Ahsan,

I already visited this site and other sites.My problem is that they are saying "add the auto-complete extendor",so my question is how to add it.

Regards.
mhamad zarif 25-Jan-11 6:26am View
   
Deleted
Dear Ahsan ,

Thanks for your kind help.But this link is not being opened.

Regards.
mhamad zarif 9-Jan-11 15:04pm View
   
I got it,thank yo very much man.You saved my day.
mhamad zarif 9-Jan-11 14:46pm View
   
The EmployeeID is set to int with IsIDentity to true and identity increment to 1 and identity seed to 1 so this is what is what you mean by autonumber ?
mhamad zarif 31-Dec-10 13:31pm View
   
Thanks for help,but what do you mean by that i need to understand what is happening.
mhamad zarif 28-Dec-10 16:27pm View
   
Deleted
I did not expect this offense on me about indentation and tagging and the spaces and capital letters , i read this in the rules down "If a tip/trick is poorly phrased then either ask for clarification, ignore it, or edit the tip/trick and fix the problem. Insults are not welcome." but i am sure now that rules are not applied here .
mhamad zarif 27-Dec-10 8:56am View
   
Thank you very much for your answer , this really helped me and now i know the functionalities of HTML and CSS .
mhamad zarif 1-Dec-10 2:57am View
   
Deleted
Thanks for your kind words all . But can any one tell me how SQL injection can work here ?
mhamad zarif 29-Nov-10 11:41am View
   
Deleted
I want to ask you what do you mean by SQL injection and how my way allows this and why you are checking if datatypes and size matches in the table . ?
mhamad zarif 29-Nov-10 11:40am View
   
Deleted
Reason for my vote of 5
Secured way
mhamad zarif 30-Oct-10 4:54am View
   
Simply guys i dont know from where to start so for this reason i did not write any code .I just needed a key to start from . And now i found that this is done using properties of textbox . Anyway thanks for help .