Click here to Skip to main content
15,167,677 members

Comments by Mehedi Shams (Top 34 by date)

Mehedi Shams 14-Jun-17 0:16am View
   
Hi Knightsurfer,

Are these the only two input/output pairs? Please post some of your code.
Mehedi Shams 7-Jun-17 20:02pm View
   
Ok got it.

But still - please follow the hint. It is so trivial and can't be missed. Hope you will find the answer :)!

Just as another hint - the actual value of 'N' is decreasing. See why?
Mehedi Shams 22-May-17 0:17am View
   
Deleted
Did you try error-trapping through TRY-CATCH? Any error msg flashed in the browser?
Mehedi Shams 22-May-17 0:17am View
   
Did you try the error-trapping through TRY-CATCH block? Any msg flashed in the browser?
Mehedi Shams 19-May-17 2:39am View
   
In that case I don't see any problem in your code. If it is exits after con.open() that would mean connection failed. You can try to trap the error in the CATCH block and see what the problem is. E.g.

Response.Write("An error occurred. Error msg: " + ex.Message);

As long as I know AttachDbFilename is uniquely used for SQLExpress. Are you using SQL Express?

Alternatively you can try other formats of connection string. E.g.:
connectionString ="Server=.; Initial Catalog=Sample; Integrated Security=True"
Mehedi Shams 17-May-17 1:08am View
   
Hi Member 13205250,

You said all the paragraph elements use the same class, but I see you are using two classes - "example" and "child". This is confusing. Are you using nested paragraphs? Please post your HTML code and explain a bit more.
Mehedi Shams 16-May-17 0:50am View
   
Hi Member 13202708,

What do you mean by sum of random position? supposing 'n' as the random position what are you trying to achieve in a and b, and what is the relation between a, b and n?
Mehedi Shams 15-May-17 2:47am View
   
Hi Member 13142768,

What are the contents of the file? Names or numbers? I mean, how do you want to compare? I don't see any comparison attempt in the code - it is just reading from one file an flushing to the other; the files would be the same.
Mehedi Shams 9-May-17 18:54pm View
   
Thanks Richard, but that is still deferring the error trapping to TRY-CATCH for an anticipated error. But I guess this is the only way?
Mehedi Shams 8-May-17 19:06pm View
   
Thanks Richard, valid points. How do you work around the second point?
Mehedi Shams 4-May-17 0:15am View
   
Hi Francis,

That would be simple as well. As soon as you create an element, that will be available in DOM. You can refer to it using 'document.getElementById'. E.g.:

input type="button" value="Calculate" onclick="calculateWithTheNewInput();"

function calculateWithTheNewInput() {
alert(document.getElementById("newInputBox").value + " This is the other existing input.");
}
Mehedi Shams 10-Apr-17 2:33am View
   
Thanks Peter, yours is better. I was just working over when you posted, missed it. This is an alternative anyway.
Mehedi Shams 7-Apr-17 20:45pm View
   
Thanks Richard, this is also good suggestion. Thanks for the links.
Mehedi Shams 7-Apr-17 20:43pm View
   
Thanks Richard for correction, this is right.
Mehedi Shams 7-Apr-17 1:52am View
   
Thanks Nirav, I shall keep that in mind.
Mehedi Shams 6-Apr-17 20:58pm View
   
Thanks, glad it helped :)!
Mehedi Shams 5-Apr-17 0:48am View
   
"for the different type of sites have different types of data attached to it." - do you have other excel files also regarding this (or you want to apply the feature after migration)? If yes, can you provide some sample data?
Mehedi Shams 30-Mar-17 20:41pm View
   
Right, thanks for correction :)
Mehedi Shams 30-Mar-17 20:21pm View
   
Hi Member 13095321,

Your code is pretty perfect. It sorts the given range of numbers in the commandline perfectly. So, what is the problem, or where are you finding difficulty?
Mehedi Shams 26-Mar-17 18:17pm View
   
Hi Member 13068046,

Glad that you found a work-around. Either way should be fine, but I don't really know why one worked and the other failed. Please make a clean rebuild and see if it is working either way.
Mehedi Shams 22-Mar-17 20:04pm View
   
Hi Member 13068046,

I tested it and it worked fine. What really might happen at your end is the event is not firing. I know this might sound odd, but did you create handlers in the right way? (Just a copy and paste of the above code would not work).
Mehedi Shams 21-Mar-17 18:19pm View
   
peek() is used like the same as reading the next character, except that it doesn't proceed the file pointer. That is, it just peeps at the next character, but doesn't proceed with usual file read operation.
Mehedi Shams 19-Mar-17 21:02pm View
   
Hi Member 13044689,

It is very difficult to pursue the problem with what you said. Can you elaborate a little more, please? What I understood is:

1) You have a big table with car plates, types, years, owners etc.
2) You have checkboxes and/or radio buttons to choose something - what are you choosing? plate numbers, types or what?
3) You want to only view specific columns based on the checkbox/radio button selections. Is it like if type and owner is selected then you want to display the types and owners columns only?
4) What are you using to display? Grid or what?
Mehedi Shams 22-Dec-16 0:13am View
   
Glad to help. Cheers :)!
Mehedi Shams 21-Dec-16 23:18pm View
   
Hi Member 12815488,

Please check the updated code. This is almost the same - just creating the instance and passing the form to the constructor in the load event only once.
Mehedi Shams 21-Dec-16 1:09am View
   
Hi Aamir,

Do you mean you want to display the error as a message box? You can use the following code in the exception block:

ClientScript.RegisterStartupScript(this.GetType(), "App Alert", "alert('This is not a valid date time.');", true);
Mehedi Shams 19-Dec-16 19:57pm View
   
Hi Member 9983063, it is just a message; please modify as suits. Number and integer are meant for the same.
Mehedi Shams 18-Dec-16 19:02pm View
   
Hi Member 12784611, the question is not clear enough. Do you mean you want to bind a textbox to a data source, and the data comes in a thousands' separator format (like 10000 will display ase 10,000)?

Please provide your code in the "What I have tried" section. This section is meant to display your code as what you have tried.
Mehedi Shams 12-Dec-16 1:08am View
   
Sorry Manish, please check the updated code for btnNext_click() event. It checks if the button was found or not.

Did the code work at all for your buttons or it happened at a certain point (like the last button click)? I tested the code and it worked fine. So a little confused.
Mehedi Shams 8-Dec-16 20:23pm View
   
Hi Member 9983063, can you please elaborate the problem a little bit more? Did you mean you want to perform the action using Shift+C (instead of 'C' or 'c')?
Mehedi Shams 7-Dec-16 22:24pm View
   
Thanks Bjay, glad to know that it helped and worked fine. Cheers :)!
Mehedi Shams 6-Dec-16 19:29pm View
   
Hi Bjay, if you see the last line of my earlier msg - 'out' variable needs to be initialized before it can be used.

At the beginning of the called method, just put 'ExceptionMsg = "";'. That will do :).
Mehedi Shams 6-Dec-16 17:08pm View
   
Hi Chris, thanks for your improvement suggestions. These are good. 'ref' and 'out' need a little more exploration. In general 'out' should be practiced more than 'ref' as 'ref' incurs carrying a value over the network (both way), whereas 'out' has overhead for one way only.

Just on usage, if 'out' is used that has to be initialized in the called method (as a rule - an 'out' variable must be initialized).

Thanks again. Cheers :)!
Mehedi Shams 17-Oct-16 18:33pm View
   
Reason for my vote of 5 \n Solved a problem in my article :)