Click here to Skip to main content
15,392,679 members

Comments by Ali Al Omairi(Abu AlHassan) (Top 145 by date)

   
I think you can use the SelectedText property
   
Elmin, you made your application with c# windows form, right?
can you post your code so i can see what is wrong with it?
   
hi;
your answer is great. I think you hit the point, but I think the if statement is good and should be edited to
if (indextoremove <= jpg.Length && File.Exists(jpg[indextoremove - 1])) for jpg and
if (indextoremove - jpg.Length <= png.Length && File.Exists(png[indextoremove - jpg.Length - 1])) for png
   
I think he is seeking an idea not trying to learn C++
   
My friend your code is very far away than the problem which was posted and answered 9 years ago.

I think you deserved to be down voted
   
The idea of this solution is to sortern the original array by 1 each time we pick an item, so the sample space will enshort evry time by 1 so we can add the statement a.length = 20-n; after assigning the empty slot a[i] to the last smple in the space.
The one mistake in the code abve would apeare in the statement of generating the random number becase the result would be a random number between 1 and 20 but the index of the iruginal array can be 0 to 19 so we can fix that by editing the statement to i = Math.floor(Math.rand() * (20 - n));
   
I think you need to group your data before you call json_encode() as you want more than a flat array
   
I doesn’t seem clear to me what your problem is, but I guess your problem is in the client side. If so, you can handle it with JavaScript and jquery
   
Thank you for the advice "Member 10236318" i would consider it.
   
search google with the query of 'How to Create and Configure Virtual Directories in IIS' and you can find your solution.
   
Then create a virtual directory from iis.
   
on your browser, open the page then press F12 to display developer tools and click the console tab.
now try to write some thing tn the text field and notice the messages appears in the console pane.
   
did you handle PageIndexChanging and PageIndexChanged events?
   
please send me the the markups of your page and the javascript you are using.
   
Sir;
Lets analyze it logically.
the link button "LinkButton1" is rendered as an HTML anchor with href of __doPostBack(target, args) or DoPostBackWithOptiont(...) to make a post back to the page.
<a href="javascript:__doPostBack(...);">Location 1</a>
You should prevent this post back by returning false in the onclick event. just like:
<asp:LinkButton ID="LinkButton1" runat="server" Text="Location 1" OnClientClick="javascript:NT1();return false;" />
this will be rendered as:
<a href="javascript:__doPostBack(...);" onclick="javascript:NT1();return false;">Location 1</a>
   
Over my head, ya Basha!
   
Sir; do you use an UpdatePanel?
   
Deleted
OK,
The first request is made by calling __doPostBack(eventtarget, eventargment) which uses PageRequestManager to send an xmlHttpRequent to the current page. But the other request uses JQuery.ajax(options) to design and send an xmlHttpRequest to a specific url.

The deference between the two request is that the first request may contain unnecessary data (e.g. Request.Form[cmdBimd.UniqueID] = "Bind Some Data") and so a larger request. The second one contains just the necessary data to identify the event requested so the request will remain small.

The reason i put both requests in my example is to feel the deference. An other good reason to choose JQuery is that PageRequestManager uses one instance of xmlHttpRequest to send all post-backs(e.g. consider two Buttons each one is responsible about refreshing an UpdatePanel, click the respectively and see what happens).

An Alternating way (to the second request) is to call a ServiceMethod through xmlHttpRequest and to use JSON to pass the parameters (As what you just said.)
   
Deleted
See my friend;
if you asked the same question twice, the first time you might get an answer, the next time you would get a kick.
   
Deleted
Well ...,
I don't see your mind. does it mean you don't have one?
   
Sir; I don't really understand your question as I have no idea about how the markups are arranged. but commonly most modal popup issues are about z-index.

please sir post your code and especially the markups.
   
Complete Answer, 5+.
But why Beginning from zero(its not an array).
   
Please send the markups of your grid.
   
what is the values of ConnectionString4 and ConnectionString4.Provider?
   
30% x 3 = 90%, the remaining is 10%. is it for Classic ASP?
   
i think, this happens because you are using the variables c2 and b2 as implit global variales.
Try to delare them explicetly.
   
Sir;
text/html is not a ratio its a reponse type
   
i think, getElementsByName('SharedName') for radio buttons and check boxes is much better than getElementById('ConntrolID'), because these controls usually group together by name.
   
would you please give us the code?!
   
Datasource is the path to the db server(host\instance);
the '.' means local host(the host on which the application is running).
'SQLEXPRESS' is the name of SQL Server instance to connect to.
AttachDbFile is the path to the database file on the given host.
Security weather a username and a password should be provided.

this configuration should be saved in web.config

as an advice, you should learn to ask google beffore asking people.
   
you should change it to connect to the database that is accessible to the server(the host).
   
no, it is not necessary because the server sends response as an html text you just need it on the server.
   
the host cannot reach the sql server specified.
did you change the connection string for the host? (you would find it in web.config)
   
Sir;
to add a comment to somebody's answer you should click the link 'Have a Question or Comment?' below the solution.
   
Sir;
Please, take a look to Solution 2 for Kammisetty's comment on you solution.
   
What Browser are you using?
   
It Seems like some assemblies are missing or some thing.
So, please add the following to web.config just after <system.web>

<customerrors mode="Off" />
   
Good Answer, My friend ... Good Answer;
   
Hi, My friend;I am seeing my code, I thought you were busy.

Look; Sir, I don't understand what is the 'Actual Results' and what is the 'Expected Results'.

Please Elaborate.
one more thing, you have to change the code:
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "startupscript", startupscript.ToString(), true);
to
this.Page.ClientScript.RegisterStartupScript(this.GetType(), this.UniqueID, startupscript.ToString(), true);
so every instant of the control will be registered uniquely.
   
Did you add it to 'App_Data' folder?
   
try to replace (GridViewRow)((Control)e.CommandSource).NamingContainer with e.Row and see if this helps.
   
actually i am "Sir" don't you see 'Abu AlHassan' in the brackets above.In Arabic Abu means father (the father of AlHassan). a fatther can't be femail,can he?
about your question look below.
   
wait a minute did you use Image.Visible = false

if so use Image.style.Add("display","none)")

on clientClick use $get('<%Image.ClientID %>').style.display = 'block';
   
call the method validate.
   
I don't think your comment was reasonable because I don't need to pass the listview in the query string,I just need the id to be passed through the query string. the other information will be found on the server-side.
100 :rose:
   
ok,.. forgive my mistake!
   
Deleted
ok,.. forgive my mistake!
   
I am sorry about the first one.
look you get this error because you are trying to serialize an array of type FileUpload which is non-serializable. i think you should use fileupload.FileBytes to save in the session. look at my answer.
   
i think you set the url property to the name of the file.
   
where is the online code exsample?
   
I like that; 5+
   
why dont you toggle display 'block' and 'none' ;
   
hundred of roses man, great links;
   
i agree its realy cool.

you know what the cp is a great site every day i learn new things from this site.
   
Thank you,sir;
   
Right, user experience guidlines exists to make the user familiar with your application,and should be followed. But sometimes you need to break this rule for good resons.
there is no rule shouden't be broken, and there is no rule shoudn't be followed.
   
Sir, does Adding the attribute 'OnFocusedRowChanged="ASPxGridView1_FocusedRowChanged"' solve the problem?
   
ok, what error it gives?
   
you kow my friend, if you don't be not careful you wort survive here.
   
over my head, Sir;
how great are you !!
   
then accept any solution.
   
over my head, sir;
i like te idea of the handler.

hundred of roses
   
over my head, sir.
hundred of roses
   
I dont think saving password in session is a good idea. and replace var with string.
+5
   
then you need to implement IMessageFilter
   
is the grid in an update panel? or you maight not bind it on load?
   
how about developing a custom cortrol extended from ToolStripMenuItem amd handlind Mouse events.
   
tankks for your points, sir.

a hundred of roses.
   
you tricked me, sir. I was down voted.
   
Sir;they say: 'a soldier doesn't drop his weapons'

but you know what, i am not a soldier.I'll take your advice, sir.

100 <IMG alt="Rose | [Rose]" align=top src="/script/Forums/Images/rose.gif">
   
... , shall i open a new project, then..?

look at the defintion of .Style1 in the .css file. which i cant see.
   
sir; you know what, I hate points.
   
i am not going to read this!!.
   
hi mostafa;
i think you should add the onclick attribute to the row in RowDataBound event.
   
Sir, its 'Mika'
   
Sir, I have fixed my code to get something working. at the end i should thank you for making time thinking in my problim.

All my Respect, Sir;
   
Deleted
Sir, I have fixed my code to get something working. at the end i should thank you for making time thinking in my problim.

All my Respect, Sir;
   
Basha, I saw your article and it was very helpfull. what i am thinking of is 'the opposite'. or in other works how to use Begin Request. Sir, I started with the code:
window.onload = function() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_beginRequest(function(sender, args) {
if ((args.get_postBackElement()).id == ‘<%= Button1.ClientID %>’)
document.getElementById('<%= UpdateProgress1.ClientID %>').style.display='none';
});
} but this didn't work yet. any suggestion;
}
   
thank you, sir for this advice. what i mean that i cant take a decision like "we should rewrite the whole application." in the other hand, i am sure that the requirement will change just like a magical trick (this happens all the time).
what i think wha iif he refused my suggestion so i have to find more alternatives. and at least i am learning.
hundred o f roses; Ali.
   
thank you, sir. but i have to use one update progress as i am not the team leader.
   
"Future is in our hands"

handred of roses;
   
please suggest a code or a link to some one.
   
you mean document.getElementById('<%= TextBox1.ClientID %>') ?!
   
he must having no hierarchy (a control on a page with no master or any parent conrol)
   
you know what, i down voted you by mistake.

Sorry!
   
Good Answer, Sir.
   
<asp:Button ID="Button1" runat="server" /> :)
   
over my head, Sandeep basha, but i don't think that Form.submit() comes with asynchronous post-back.

100 :rose:
   
over my head, Sir;

100 :rose:
   
tell me how.
   
don't you have got a eraser?!!
   
you can add a comment to his answer.
   
JBenhart said: "Can you elaborate? I don't know that much about that. "
   
it is me too!!
   
make an intermedeate class.
   
I voted for you. (remember me) ;)
   
Sir, would you please mention the reson.
   
thank you, sir.
   
Sir, How about enabling event validation on control level? do you have any idea for that?

100 :rose: ;)
   
Sir, you shouldn't remove 'and', you should add it; the result should be :

dirSearcher.Filter = String.Fomat("(objectClass='Computer') and (cn ='{0}')", compuDesc ) '(objectClass='Computer') and (cn ='RM212')
   
i think the key word 'and' can solve the issue. :)
   
me sorry, me no mean to.
if me bathar you, me shood abalgese.

100 :rose: ;)
   
Sir, your response is freezing to death.
   
me sorry, me no good on englisia.

but any way you should not had to get too hot (calm down, this would kill no body)
   
Sir, how about my answer?!!
   
..and, have mine.
   
good..!! have a 5+
   
good, this reminds me with the first ASP.NET application i developed.
100 :rore: ;)
   
Great..!!
you found you own way, Congratulations!!

100 :rose ;)
   
sir, I don't think that you can close a Form then execute any code after that in the same object.
   
Sir, if you used 'frmTwo' as a modal dialog, form 'frmOne' should be kept not disposed because its the parent of 'frmOne'.
   
wel.. i think it was 100 :rose: or "A hundred of flowers"; in jordan we use this expression to tell that every thing is good and we are satisfied (just like the american 'Cool!'). we use the 100 all together (on flower wont be enough) :)

100 :rose:
   
over my head, sir. i can see you comments everywher.

100 :rose:
   
ok,sir. lets start from the begining.
add a ListView to your form with some events handled, and improve your question.

100 :rose: ;)
   
Sir, I think SA soution is good. I used something like that in the past when i was developing some similar program (as gmf's). but i think using string.Split and just use no "Magic" is a stupid thing. so is there any way to exclude a complete word from a regular expression?
   
I am still in your side, Manfred. 5+
   
Sir I thing that you should give him anotheer chance.

100 :rose: ;)
   
ok, sir. this was stupid from me. but really i wanted to help.

100 :rose: ;)
   
good alternative, sir.
   
Sir, you are doing realy good. 5+

100 :rose: ;)
   
OK, Sir. As you Command. Sir!!

:cool:
   
your mission?!! OK,Soldier. You can relax. :)
but sir, I think he's trying to get commands from user, so i think Regex is fine.

100 :rose: ;)
   
Sir, you said
1)lstclnt in client project
2)lstsv in server project
How did you transfer the data? (via TCP?)

100 :rose: ;)
   
Sir, i am not interested in reading your ASP code. but according to your description you need to add a trigger to your update panel.
   
how about auto complete textbox?!!

100 :rose: ;)
   
this is interisting,man. but i dont think the first code is neccesary where you can surrond the div "Disabled" with <noscript> tag.
   
Dear, I don't know what is wrong with exception. it tills the administrator what wrong with his system. for the client you can cought it and send an appropiate response by using try-catch statment. (I remember that I once was dieing to get one clear exception).

100 :rose: ;)
   
Over my head, Sir.
   
you know, man. when i was a student i was working hard but in a closed circle being no body helping me. se i found my own way by trying again and again.
this maight be the reason why i beleve that every student has the right to get the help he need. (but in his case you can just cut off head.)

100 :rose: ;)
   
Sir, be easy with him. he's just a student.
   
Sorry, I didn't under stand your question but i thing your problem is that your form is getting frozen until the end of 'button1_Click' method.

In this case you should use a callback delegate to modify the property within the same thread.
   
Sir, give me the code you write in the .aspx.vb/.aspx.cs handling the onclick event.
   
Thank you, Marcus. As you maight know I am still new to the CP; I don't know much about using its features.
by the way, what is the OP's?
   
I think this can be done in the traditional way no mater the target system is linux or windows.
   
thank you for doing this, Alen.
   
Sir, thank you for advising me. but really i don't understand this portion.
"Do you see that I have the powers to move your comments? "

100 :rose:
   
thak you sir, i didn't know before. but why do you thing reading a datatable already loaded in memory can be useful.
   
Sir, this is not of your business. Thank you.
   
thank you man, but i think my problem was in installation; i shouldnt have cheched "Case Sensitive" Check box.

by the way, Can I change some setting to make it case-insesitive?
   
thanks for your post, man. I did not think this was possible.
   
I have seen your Answer but I don't think that it provides a solution for this problem. since the problem statement contained "(for each row)" specifier. thank you.
   
Deleted
Sir, May I see your form.
   
Sir, are you trying to handle OnCheckChanged for a checkbox with in a gridview?
   
You are my friend Speaks big talk, to get this you need inherit from DbCommand, DbConnection then DbAdabter

And note that DbAdabter replaced with implement for IDataAdapter.
   
thanks for your assistance it was very helpful.