Click here to Skip to main content
13,045,564 members (70,819 online)

Comments by Ranjan.D (Top 180 by date)

Ranjan.D 14-Oct-14 9:32am View
Reason for my vote of 1 \n Misleading title and probably off topic.
Ranjan.D 27-Jun-14 12:57pm View
Mostly you should not be encountered with issues. Why don't you just give a try and let us know how does it works ?
Ranjan.D 15-May-14 9:58am View
I have updated the code. Please see the above code. For more information on the basics, please do refer
Ranjan.D 12-May-14 15:39pm View
A simple and most elegant reports can be build with HTML and CSS too!
Ranjan.D 21-Feb-14 15:31pm View
Ranjan.D 10-Feb-14 15:52pm View
Yes Ravi. I knew it wasn't with foreach but hopefully there's a way with for loop like the below example. Or use Linq approaches.

var data=new List<string>(){"One","Two","Three"};
for(int i=data.Count - 1; i > -1; i--)
Ranjan.D 10-Feb-14 15:28pm View
Just by using for loop instead of using foreach must work I believe.
Ranjan.D 3-Feb-14 11:34am View
Put a breakpoint and debug the code. Try to see the count of (Excel.Worksheet)xlWorkBook.Worksheets. Note : Your error message clearly says Invalid index.
Ranjan.D 29-Jan-14 9:45am View
Although the position data is not X and Y but it has to be the Geo location Lat and Long. Have a look into this article on how to retrieve them -
Ranjan.D 29-Jan-14 6:43am View
You may have to contact your guide and work under his/her guidance.
Ranjan.D 24-Jan-14 17:40pm View
Actually it's being a while I had used :) But I did knew this will resolve your problem. Hmm I need to recall and restart migration things!
Ranjan.D 24-Jan-14 12:18pm View
The problem here is you don't have the right data. Please make sure you got all the data and also fix the code to handle when you have no data.
Ranjan.D 24-Jan-14 12:10pm View
No you should not remove, Also your code should handle when there's no instance. See there's a check on IDSC6Reports = SC6ReportID. I think it's not getting satisfied for the SC6ReportID.
Ranjan.D 24-Jan-14 12:03pm View
_entities.SC6Reports might not have records for SC6ReportID so the .FirstOrDefault will return Nothing. You will have to make sure you have records for SC6ReportID in _entities.SC6Reports.
Ranjan.D 24-Jan-14 11:53am View
it looks like SC6Report is Nothing. Just put a break point and verify whether you are getting SC6Report instance or not ?
Ranjan.D 24-Jan-14 11:34am View
Is there a reason why you are trying to embed second Image canvas within First ?
Ranjan.D 23-Jan-14 15:51pm View
It's really hard for me to understand what founded sources and their implementation might though exception if you are decryption with wrong key.
Ranjan.D 23-Jan-14 14:53pm View
Try putting a breakpoint on the below line and see whether you are getting a DataTable filled with rows in it.

Repeater4.DataSource = sear.searchdcouments(searz.Text);
Ranjan.D 23-Jan-14 14:44pm View
You should let us know the database attribute type COMPC ?
Ranjan.D 17-Nov-13 20:01pm View
Just google and learn how to work with EF. There are plenty of article out there.
Ranjan.D 13-Nov-13 10:46am View
Yes I have done the same for changing the shortcut icon in InstallShield Limited Edition. Hmm not sure about the setup icon but I think it should be possible.
Ranjan.D 13-Nov-13 10:39am View
It is possible. I have created the same :)
Ranjan.D 11-Nov-13 11:42am View
Did you meant verify password and make sure they are matching before you submit form ?
Ranjan.D 11-Nov-13 10:40am View
Post your code, so that we can have a look into.
Ranjan.D 5-Nov-13 13:42pm View
Cool. Public code dump :)
Ranjan.D 5-Nov-13 12:10pm View
Tell us what research you have done so far? Most of the stuffs can be obtained with a simple Google Search. Any ways here's one for beginners -
Ranjan.D 5-Nov-13 0:52am View
I think he must be a student or a unlucky guy working on legacy application :(
Ranjan.D 4-Nov-13 19:31pm View
Thanks for understanding. As always your solution is really awesome.
Ranjan.D 4-Nov-13 17:48pm View
I did not mentioned it's for ASP.NET?? Now where comes the ASP.NET?? Log4net applies for Desktop / Web Applications.

If OP is interested with Log4NET , I will let him/her to go ahead and research.
Ranjan.D 4-Nov-13 17:31pm View
Sorry I can't guide you with some random DataContract. Have a look into the book I suggested or download some code samples to learn how it works. You need to design or ask whether you will receive file as Streams. It depends on the requirements , We can't really assume things.
Ranjan.D 4-Nov-13 16:17pm View
Learning WCF by Michele Leroux Bustamante is a great book for beginners.

You said "Now I need to create a service where client will send order(s)" , Please explain do you need to process client orders ? To Receive Orders, You need to have a DataContract.
Ranjan.D 3-Nov-13 18:55pm View
Probably you need to sit with your mentor talk to him/her with your problems and clarify the same.
Ranjan.D 3-Nov-13 18:54pm View
Download code from CodeProject, CodePlex, MSDN and there are many more opensource sites where you can get different source code for different c# applications :)
Ranjan.D 2-Nov-13 23:02pm View
Inherit TextBox control and add properties, behaviors.
Ranjan.D 2-Nov-13 14:36pm View
Please ask your guide/google and follow directions.
Ranjan.D 2-Nov-13 14:32pm View
Are you still trying or could you show us the code ?
Ranjan.D 1-Nov-13 16:42pm View
Yes you are right. There's no product exiting which does real time voice conversion. I believe if the OP does , she/he will earn a million dollar :)
Ranjan.D 1-Nov-13 12:59pm View
I don't understand what you mean by disappear.. Please do check the html source , try building it again and retest.
Ranjan.D 1-Nov-13 12:22pm View
We can certainly help you by all means if you have specific problem or questions.
Ranjan.D 1-Nov-13 7:06am View
Go ahead and code. Do you have any problem ?
Ranjan.D 1-Nov-13 5:58am View
You don't need a while loop at all. Did you see the below code in that article ?

SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
DataTable dt = new DataTable();
GridView1.DataSource = dt;

In first query instead of ExecuteReader you can use ExecuteScalar to return first row, first column value i.e to get P.PartrowID. Once you get this use the above code to fetch the records as you wish.
Ranjan.D 31-Oct-13 23:19pm View
Please use your time in learning how to code than asking for your assignment solutions.
Ranjan.D 31-Oct-13 14:37pm View
This is the second time I'm seeing this factorial code which is not related to OP's question. I'm really going mad :)
Ranjan.D 31-Oct-13 14:29pm View
Check how does your Gridview render ? Go to view source and have a look into.
Ranjan.D 31-Oct-13 12:27pm View
Looks like a coding requirement dump. Not really a valid question.
Ranjan.D 31-Oct-13 5:53am View
No you still didn't answer my question - intranet environment or internet accessible?
Ranjan.D 30-Oct-13 12:33pm View
Tell them ambiguous question.
Ranjan.D 30-Oct-13 11:49am View
Check the user level which should be in your session and then redirect to the page you wish.
Ranjan.D 30-Oct-13 11:46am View
Invalid answer! May be a wrong post
Ranjan.D 30-Oct-13 11:17am View
Sorry this would be a temporary solution and it's not really a good one because imagine one has to add these lines of code in every page.
Ranjan.D 30-Oct-13 11:13am View
Tell me one thing, You want to make it to work in an intranet environment or internet accessible ? The answer depends on what you say ? Please be specific
Ranjan.D 30-Oct-13 11:05am View
It seems like you never did a Google search for Quran feeds..

Here's what I got in just 1 second of Google. The below one has images too

Google by
Ranjan.D 29-Oct-13 12:56pm View
5+ , Better than MSDN Doc :)
Ranjan.D 29-Oct-13 12:54pm View
Do you have the database table schema for the same ?
Ranjan.D 29-Oct-13 11:44am View
Need some time to think about this, of-course it's not an easy one.
Ranjan.D 29-Oct-13 10:44am View
Did you tried debugging. If not here's something you need to do
Ranjan.D 29-Oct-13 10:43am View
Seems like an academic project, You need to tell us what you have researched and show us your effort you did so far.
Ranjan.D 29-Oct-13 7:40am View
Google search results in

About 477,000 results (0.47 seconds)
Ranjan.D 29-Oct-13 7:34am View
Please be descriptive about the chart library and explain your problem. There are thousands of chart library out there and we don't really understand unless you are using one of the Microsoft Server Controls.
Ranjan.D 29-Oct-13 7:29am View
All you need to do is, on success of your Ajax call do something like below

var jsonDataArray = JSON.parse(data);

Then loop through the array and access JSON properties.
Ranjan.D 29-Oct-13 6:25am View
Desktop or Web App ??
Ranjan.D 29-Oct-13 6:24am View
Depends on how the design, In your case I'm not fully understood why did you went up in creating pages for each customers. You can convert some of the control to server side controls and reuse across.
Ranjan.D 28-Oct-13 13:45pm View
Who's working on the file is by default shown in Windows when you are trying to open a shared file. It will show up with Domain\username.
Ranjan.D 28-Oct-13 10:48am View
Just join tables and apply logic.
Ranjan.D 28-Oct-13 7:16am View
You will have to try out some other options to download large files, I never worked this case and 400MB is really a huge thing to deal. Try WCF Chunking of data.
Ranjan.D 27-Oct-13 21:09pm View
Note : The OP did mentioned "I'm new to coding in C++ in general"
Ranjan.D 27-Oct-13 13:20pm View
Thank You.. Glad you got the solution :)
Ranjan.D 27-Oct-13 13:02pm View
5+ Perfect
Ranjan.D 27-Oct-13 12:59pm View
For Official purpose one should use licensed version of VS.
Ranjan.D 27-Oct-13 10:45am View
Fist please make sure you have the correct connection string key i.e sqlcon. When you reference the data access layer with in your web project you should be able to access this connection string..

You are just saying getting an error, but what exactly the error is ?
Ranjan.D 26-Oct-13 14:40pm View
forget about function/method. Let us call as it's methods in C#. In order to differentiate look for the return type. If it's void then the method does not return a value.
Ranjan.D 26-Oct-13 14:38pm View
Perfect !
Ranjan.D 26-Oct-13 14:12pm View
Sorry I can't agree with "method does not return a value" , take an example of extension methods , they can either return or do not return a value.
Ranjan.D 26-Oct-13 14:07pm View
How about extension methods and I assume you are getting confused now :) and please be specific when you say something in C#
Ranjan.D 25-Oct-13 22:40pm View
Yes perfect !
Ranjan.D 25-Oct-13 14:39pm View
+5 , Ultimate solution.
Ranjan.D 25-Oct-13 13:24pm View
Check whether your POST request is passing in a value for 't'
Ranjan.D 25-Oct-13 12:20pm View
True. I guess the OP might have thought there could be an intelligent robot who can provide him with source code so that he can enjoy drinking coffee and receiving pay checks :)
Ranjan.D 25-Oct-13 9:46am View
Refer the API doc and implement the same. Sorry I can't help other that providing you a direction to implement.
Ranjan.D 25-Oct-13 7:36am View
Lounge posting is like ethical way of disappearing :) Sure to expect some flames for posting SPAM.
Ranjan.D 24-Oct-13 23:07pm View
Make a HTTP Web Request to the wiki page and as Sergey Alexandrovich mentioned do some scraping on the web response.
Ranjan.D 24-Oct-13 23:00pm View
It looks like the OP is not trying to implement calculator. He's building some logic and using calculated values in his code.
Ranjan.D 24-Oct-13 22:57pm View
When you are hosting the service in IIS it's the web.config which is really required.
Ranjan.D 24-Oct-13 21:51pm View
When you say its not working , could you update with description about the errors or problems that you are facing?
Ranjan.D 24-Oct-13 19:57pm View
Yes right. I think it all depends on how we ask, what we researched before asking. Some peoples just post questions with no research, I don't really know they expect something :)
Ranjan.D 24-Oct-13 19:46pm View
Brother even Visual Studio is not free then who will give free controls for us :) Try to dig into codeplex you might get some opensource ones.
Ranjan.D 24-Oct-13 17:34pm View
I was just having a look into some thing for you.. and here I got one..

You are lucky messages can be secured very easily :) I think you can do something like below
<binding name="wsMessage">
<security mode="Message">
<message clientcredentialtype="None"></message>
Ranjan.D 24-Oct-13 16:48pm View
You could do some custom header encryptions. Have a look into -

Yes it's not a good idea to include sensitive information in soap header
Ranjan.D 24-Oct-13 16:35pm View
Yes I had shared with you the link - , check previous post :)
Ranjan.D 24-Oct-13 16:17pm View
No the Resultset will not be passed and like Java the SqlCommand will be executed and it will return the SqlDataReader, You just need to do the following, I don;t understand why are you comparing Java and C# and getting confused..

SqlCommand command = new SqlCommand(
"SELECT CategoryID, CategoryName FROM dbo.Categories;" +
"SELECT EmployeeID, LastName FROM dbo.Employees",

// Open a database connection

// Execute command to return the reader
SqlDataReader reader = command.ExecuteReader();

// Loop through the reader
while (reader.HasRows)
Console.WriteLine("\t{0}\t{1}", reader.GetName(0),

while (reader.Read())
Console.WriteLine("\t{0}\t{1}", reader.GetInt32(0),
Ranjan.D 24-Oct-13 15:58pm View
Absolutely , Why not :)
Ranjan.D 24-Oct-13 15:56pm View
Yes the Datareader is some what equivalent to Resultset . SqlCommand is used to execute the sql query and it will return the DataReader.

The Java Doc says what the ResultSet is - A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

In C# the statement can be considered as SqlCommand. Hope this helps you.
Ranjan.D 24-Oct-13 15:18pm View
Have a look into the update code.
Ranjan.D 24-Oct-13 15:18pm View
Tell us what exactly is your problem ?
Ranjan.D 24-Oct-13 15:16pm View
That's the reason I said though Java, C# look alike there are lots of differences. All you need to do in C# is create a connection object, command object and set the sql query to execute then execute the command so you will get a datareader , finally process the reader. It can be done with in 8 lines of code.
Ranjan.D 24-Oct-13 14:56pm View
Ranjan.D 24-Oct-13 14:52pm View
I suggestion not to duplicate , but understand the logic and do the same in C#.. Have a look into in order to Retrieve Data Using a DataReader.
Ranjan.D 24-Oct-13 14:42pm View
Looks like you need to handle Gridview DataRow bound event and alter button text.
Ranjan.D 24-Oct-13 14:24pm View
Yes, it's possible. Even I'm lazy to answer or provide source code for these questions.

PS: One liner question and a one liner answer :)
Ranjan.D 24-Oct-13 14:18pm View
Join tables based on their primary key. You did not even said what type of join. Have a look into -
Ranjan.D 24-Oct-13 14:16pm View
Have a look into -
Ranjan.D 24-Oct-13 14:14pm View
Oh boy you just need to target the framework version that's it.. what code you have written to break ? I'm kinda lost :laugh:
Ranjan.D 24-Oct-13 10:38am View
May an Ajax request on textbox onblur
Ranjan.D 24-Oct-13 10:32am View
There is not way you can accept user inputs and process the same in Page_Load.
Ranjan.D 24-Oct-13 10:24am View
If you are anticipating user inputs for the below code, it wont work in Page Load. You will have run this code in say Button Click

int a = Convert.ToInt32(TextBoxTA.Text);
int b = Convert.ToInt32(TextBoxTL.Text);
TextBoxTNA.Text = Convert.ToString(a - b);

int a = Convert.ToInt32(TextBoxNPRNA.Text);
int b = Convert.ToInt32(TextBoxETRNA.Text);
int c = Convert.ToInt32(TextBoxTUNA.Text);
TextBoxTNA2.Text = Convert.ToString(a + b + c);

int a = Convert.ToInt32(TextBoxTA.Text);
TextBoxTNA.Text = Convert.ToString(a / 12);
Ranjan.D 24-Oct-13 10:08am View
Not 100% sure may be sensors for recognizing voice, color etc depends on your requirement.
Ranjan.D 24-Oct-13 10:02am View
Perfect solution, Would recommend the same.
Ranjan.D 24-Oct-13 10:01am View
I really don't understand why did you coded everything with in the Page_Load. Obviously it will never work.
Ranjan.D 24-Oct-13 9:57am View
Create a MONO project , Reuse the C# code and run it on linux. Sorry it wouldn't be a simple thing to convert from C# to Java, You got to understand every line to convert from one language to another. I don't say it's not possible but it takes significant time.
Ranjan.D 23-Oct-13 21:00pm View
Welcome.. I apologize if thongla has written this code and faced issues. I'm glad it resolved issue :)
Ranjan.D 23-Oct-13 20:04pm View
Usually SA tells not to help peoples who do nothing but still sometime I do help.

You need to run through debugger , see where the control flows , what it prints and why it doesn't print. That's the only way you can rectify your coding issues.

BTW I see an issue in the below line, the matches function expects regex. Your line not only contains MIS but also includes space.

if (line.matches("MIS"))

Try below

line.matches("MIS(.*)")) or line.matches("(*.)MIS(.*)"))
Ranjan.D 23-Oct-13 13:54pm View
Hmm interesting, expecting a full project :)
Ranjan.D 23-Oct-13 12:00pm View
Thank you. I hope this would be one of the easiest solution..even i learnt something new :)
Ranjan.D 23-Oct-13 11:45am View
Cool! I never know about that fight. Interesting and true fun :)
Ranjan.D 23-Oct-13 11:38am View
Do you close the application instance like below ?

Ranjan.D 23-Oct-13 11:35am View
Did you tried anything so far ?
Ranjan.D 23-Oct-13 11:32am View
+5 for pointing google :)
Ranjan.D 23-Oct-13 0:30am View
Reference -
Ranjan.D 23-Oct-13 0:28am View
Give a try with this , it checks for first row

if(dtQuantityData[0]["ProductID"] == DBNull.Value){
Ranjan.D 22-Oct-13 23:51pm View
I hope FileUpload1.PostedFile.FileName should work.

Please have a look into -
Ranjan.D 22-Oct-13 23:13pm View
I'm not confusing any one. All I code as per the requirement, sometimes I don't have to necessarily go , dig in line algorithm and understand about infinite derivatives. I just do my duty in helping peoples on my time. If peoples start arguing and proving we will spoil ourselves and this should not happen. Remember we are not here to prove anything, we are just helping hands. Sometimes we may go wrong, doesn't mean we are confusing peoples.
Ranjan.D 22-Oct-13 22:46pm View
Sorry you were partially right with Json but not with edmx or linq :)
Ranjan.D 22-Oct-13 22:43pm View
It's fine, I don't have to recall line algorithm. I'm just helping the OP based on his requirement.
Ranjan.D 22-Oct-13 22:38pm View
Not a solution. Please read the question carefully and post answers. OP is looking for edmx or linq solution.
Ranjan.D 22-Oct-13 22:35pm View
if (x2 - x1 == 0)
cout<<"undefined" << endl;
cout << y2 - y1 / x2 - x1 << endl;

I advise you to learn basics and code solutions. These are really really basic things of programming.
Ranjan.D 22-Oct-13 22:16pm View
First of all you should know or ask your teacher for what values of x1 y1 x2 y2 the slope is invalid.

Printing "undefined" is easy as you could do with cout<<"undefined".
Ranjan.D 22-Oct-13 17:10pm View
I see there's one problem in your Grid. Your stored procedure does not return data for column DepType , so how can you have the below mentioned BoundField ? Remove that and verify.

<asp:BoundField DataField="DepType" HeaderText="Department" />
Ranjan.D 22-Oct-13 15:08pm View
Wait you have to set a breakpoint on the below line on GrdFileApprove.DataSource , Then hit F11 for single step debug, then check the GrdFileApprove.DataSource , use visualizer to see the datatable.

GrdFileApprove.DataSource = dd.hrdoc1(Convert.ToInt32(Session["a"]));
Ranjan.D 22-Oct-13 14:59pm View
First off I have never seen a working Java code like this. So I can't really say anything except Nan which RyanDev has mentioned correctly.
Ranjan.D 22-Oct-13 14:45pm View
It doesn't matter. Did you do single step debug and try to verify whether the DataTable has that particular column or not ?
Ranjan.D 22-Oct-13 14:38pm View
It doesn't do live search as you key in the textbox. But a good example of Jquery Ajax.
Ranjan.D 22-Oct-13 14:36pm View
Put a breakpoint on line GrdFileApprove.DataBind(); and check whether the datasource has a column for DocType.
Ranjan.D 22-Oct-13 11:26am View
How in the world I can understand what code you have written for button click to enable fields.
Ranjan.D 22-Oct-13 10:40am View
Did you add the Jquery CSS as link in your web application? If not try to add and verify the same.
Ranjan.D 22-Oct-13 10:29am View
There is no Jquery DDL in this world. Are you sure about that ?
Ranjan.D 22-Oct-13 10:02am View
Glad you did it. Programming is always exciting, Hope you will enjoy doing on your own :)
Ranjan.D 22-Oct-13 7:37am View
Read the question carefully. The first 3 min will be charged by 1.15$ and the remaining minutes of talk will be charged with 0.26$. It's a basic mathematics, I can't really help.

If it's 13 min then the first 3 min will be charged at 1.15$ so the rest 10 min will be charged 10 * 0.26$ = 2.6$ and the total call charged will be 1.15$ + 2.6$ = 3.75 $
Ranjan.D 21-Oct-13 23:23pm View

Please take a look into the Automapper unit tests , you will come to know various scenarios you can make use of it.

I have seen many peoples using even in MVC Projects to build ViewModels. I will shortly share with you free realworld samples.
Ranjan.D 21-Oct-13 22:13pm View
Please take a look into the Automapper unit tests , you will come to know various scenarios you can make use of it.

I have seen many peoples using even in MVC Projects to build ViewModels. I will shortly share with you free realworld samples.
Ranjan.D 21-Oct-13 22:11pm View
Super Lloyd,

Please take a look into the Automapper unit tests , You will come to know exactly where you can make use of it.

I have seen people do really make a good use of it even in MVC project to map and get ViewModels. I will let you know shortly with real world examples.
Ranjan.D 21-Oct-13 21:27pm View
If the total call length was 50 min then the first 3 min will be charged $1.15.
second part , The rest 50 - 3 = 47 min will be charged as 47 * $0.26 = 12.22$
Ranjan.D 21-Oct-13 21:17pm View
There are some really really good sample projects , Please take a look into especially ProjectTracker -

CSLA code samples -
Ranjan.D 21-Oct-13 20:57pm View
There's a hint I got for you , but you have to code :) -
Ranjan.D 21-Oct-13 20:53pm View
+5 , That's it we got a solution. If his english is not good and unable to explain that's fine but if he doesn't try to complete his assignment then what else we can say ? I don't really understand why some people are not interested to learn or complete assignments.
Ranjan.D 21-Oct-13 20:41pm View
You should be more specific about the requirement , If you are asking for code samples as a web project then you have to comeup with requirement and spend some time in learning and coding.. If you encountered with any issues we can help.
Ranjan.D 21-Oct-13 20:38pm View
Some times it becomes so mandatory , consider an example you are implementing a WCF Service where in you might or not be using EF for data access or say you will be having a data access object , now that you need to map the data access object to your data contract as a return value of your service and We can do vise versa. There are lots of circumstances were in we can make use of Automapper.
Ranjan.D 21-Oct-13 19:41pm View
There are several reasons WCF communication cannot be done because its in Faulted State. Enclose your code in try-catch block and do a single step debug. Let us know there's any fault in your service.
Ranjan.D 21-Oct-13 17:41pm View
Perfect, It should work!
Ranjan.D 21-Oct-13 16:52pm View
I have posted the solution. Does that works for you?
Ranjan.D 21-Oct-13 15:49pm View
Put a debug in line return dtResult; and see whether the data table is filled with some records.
Ranjan.D 21-Oct-13 13:23pm View
I agree with you. Some time people are lazy to Google/Read MSDN. I feel sad :(
Ranjan.D 21-Oct-13 13:21pm View
You need to add a key of type - subcast
Ranjan.D 21-Oct-13 13:18pm View
Sorry updated code, your separators should be (MSH,PID, NK1, PV1 ) etc.. String.Split takes one or string separators for splitting. Don't forget to append words like below

Dim index As Integer = 0
For Each word In words
word = separators(index) & word
index = index + 1
Ranjan.D 21-Oct-13 12:45pm View
Have a look into

string[] separators = {"^", "|"};
string value = "MSH|^~ ... ....";
string[] words = value.Split(separators, StringSplitOptions.RemoveEmptyEntries);

PS: I hope you are aware of PHI
Ranjan.D 21-Oct-13 12:30pm View
You could get client's IP Address instead of MAC Address. The authorization mechanism purely depends on your requirement how you want to go with it.

Simplest approach is to go with Role based authorization for the logged in user.
Ranjan.D 21-Oct-13 12:25pm View
Could you dump some code snippets so we can analyse ?
Ranjan.D 21-Oct-13 12:11pm View
Did you intend to get client's MAC address or IP Address ?
Ranjan.D 21-Oct-13 12:08pm View
Obviously your code doesn't work as expected because the compiled code runs at server (hosted in xyz domain) and it will return the mac address of the server
Ranjan.D 21-Oct-13 10:28am View
Updated code, Just give a try
Ranjan.D 21-Oct-13 10:19am View
The only problem I see is the first line of using statement.
Ranjan.D 21-Oct-13 10:14am View
Could you verify the column is NULLable in database table ? Just a second quick check.
Ranjan.D 21-Oct-13 7:12am View
Good to report as Not a question. We are not supposed to solve student assignments :)
Ranjan.D 21-Oct-13 7:06am View
I don't think its possible. Source -

However at the minimum you could do binary comparison to determine the PDF documents are same.
Ranjan.D 21-Oct-13 6:58am View
I don't think WebView supports post requests because as per the documentation it says WebView Provides a control that hosts HTML content in an app.

Source -
Ranjan.D 20-Oct-13 19:56pm View
Not Enough Information. Please restate your exact requirement or problem. I have logged into the page and all I see is + القمح 6 , Do you want to click on + and do some thing?
Ranjan.D 20-Oct-13 19:36pm View
There's no way you can manually set the FileUpload;s FileName property from code behind as it's a readonly property. Not sure you can do some magic in Javascript , still when you resubmit the HasFile will be fase.
Ranjan.D 20-Oct-13 17:46pm View
There could be some issue with ExecuteDatasetOnly. Did you write any custom code? Did you tried doing single step debug?
Ranjan.D 20-Oct-13 17:12pm View
Ahh forgot to remove one more line of code which is not required

bindingSource = new BindingSource(); ;
Ranjan.D 20-Oct-13 17:10pm View
Dear Daia Alexandru,

Yes the Google Finance Service is stopped but still we can reuse code and screen scrapping..

I have coded something similar, Please download and have a look into this project using Google Finance.

Let me know if it helps.
Ranjan.D 20-Oct-13 17:00pm View
Here's the modified code.

Note : The database connection string has been changed to include database.

private void Binding()
string connStr = string.Format("datasource=localhost;Database={0};port=3306;username=root;password=root;", schemaForm.getData);
using (conn = new MySqlConnection(connStr))
MySqlCommand command = conn.CreateCommand();
dtable = new DataTable();
bindingSource = new BindingSource(); ;
command.CommandText = "SELECT Metabolite_Name FROM" +
"Metabolites " +
"WHERE MetaboliteID IN ('met1', 'met2');";
MySqlDataReader dr = command.ExecuteReader();
dbMetName.DataSource = dtable;
catch (Exception ex)
Ranjan.D 20-Oct-13 16:52pm View
I think the problem is with the table name - .Metabolites , Please remove (.) dot or make sure the table name is correct. Also you can put a breakpoint in command.CommandText , do a single step debugging by pressing F11 , then copy the sql query and execute the same in MySql bench , sure you will know what's the problem.
Ranjan.D 20-Oct-13 16:40pm View
I have modified the code a bit.. Try now.. Also put a breakpoint and check whether the datatable is being populated.
Ranjan.D 20-Oct-13 16:28pm View
You can't do insert/update operation with ExecuteReader. Your code for Binding does get all the data and you are trying to bind to Grid. I do not see any Insert Operation.

Here's the modified code

private void Binding()
string connStr = "datasource=localhost;port=3306;username=root;password=root;";
conn = new MySqlConnection(connStr);
MySqlCommand command = conn.CreateCommand();
string database = schemaForm.getData;
dtable = new DataTable();

command.CommandText = "SELECT Metabolite_Name" +
"FROM " + database +
".Metabolites WHERE"+
" MetaboliteID IN ('met1', 'met2');";
SqlDataReader dr = command.ExecuteReader(CommandBehavior.CloseConnection);
dbMetName.DataSource = dtable;
catch (Exception ex)
Ranjan.D 20-Oct-13 12:26pm View
Do you mind specifying which database ? You need a server side technology.. it's not possible with HTML alone.
Ranjan.D 20-Oct-13 12:24pm View
Note: The OP is asking for Linq solution.
Ranjan.D 20-Oct-13 12:12pm View
Hmm.. the code doesn't.. I would go with server side using ProcessStartInfo
Ranjan.D 27-Sep-13 14:27pm View
Reason for my vote of 5 \n Thanks for the review.
Ranjan.D 12-Sep-13 14:36pm View
Reason for my vote of 1 \n The poor tip I have seen so far in my life :(
Ranjan.D 27-Aug-13 12:53pm View
Reason for my vote of 5 \n Impressive. Did you do your Phd in Calculator :)

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid