15,740,980 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Javascript questions
View C++ questions
View Python questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by idenizeni (Top 149 by date)
idenizeni
28-Mar-14 15:04pm
View
When you push it to localhost the site runs under the IIS service which doesn't have a desktop to capture.
idenizeni
17-Mar-14 19:44pm
View
What are your initial thoughts as to why the code might be good or bad?
idenizeni
12-Mar-14 15:43pm
View
What was the problem? How did you solve it?
idenizeni
7-Mar-14 14:32pm
View
Check your config file to see if you have a < character in one of the values. If so you probably want to encode it as config files are XML and < is a special character in XML.
idenizeni
6-Mar-14 13:26pm
View
When I click the link I see...
"Your search did not match any documents."
idenizeni
25-Feb-14 14:26pm
View
FYI, the XML you posted is missing the closing quote around the first JOIN element's ON attribute.
idenizeni
21-Feb-14 16:00pm
View
Questions: Are you sure the query returns results? My first guess would be your query isn't returning results, does tblTest have records in it? Are you sure the button event is fired? Is the GridView's Visible property set to false?
idenizeni
20-Feb-14 20:24pm
View
I agree using the referral URL is a viable option, I would only add that a user can easily build a request and manually set the referrer URL to whatever they desire.
idenizeni
18-Feb-14 20:45pm
View
I think OriginalGriffs solution should work for you. However, I believe you need to look at your query because the results are probably empty. The XML you posted it not properly formed as you have a start element of Parameter and an end element of Parameter1. I'm guessing this is only in what you posted and not your actual XML but you may need to verify your XML is well-formed.
idenizeni
13-Feb-14 12:02pm
View
If you reply to a comment the user will get an alert, it looks like you posted the comment to your original question. As for your issue, like RyanDev said, if you type the channelid column as a number the sorting will happen as you expect. When data is typed as a string and you sort numbers you get sorting like you are currently getting. If you can, change the datatype at the source data store or when you load the data into its table set the columns type to a number.
idenizeni
11-Feb-14 12:02pm
View
var contact = (from cont in context.Contacts
where cont.ContactID == Convert.ToInt32(cboContactList.SelectedValue)
select cont).SingleOrDefault();
Use double equal operators to check for equality. Also, you may want to use the SelectedValue property instead of the SelectedIndex as the fourth item in your combobox may not have an id equal to 4.
idenizeni
7-Feb-14 20:40pm
View
Is this happening in your development environment or in production? If it's happening in development then I wouldn't worry too much about it IF while you are testing you re-compile your application and then try doing a page post-back from a page that was loaded before the recompile.
idenizeni
7-Feb-14 20:39pm
View
Crap, I sure did. Thanks.
idenizeni
7-Feb-14 18:12pm
View
Is this happening in your development environment or in production? If it's happening in development then I wouldn't worry too much about it IF while you are testing you re-compile your application and then try doing a page post-back from a page that was loaded before the recompile.
idenizeni
5-Feb-14 15:29pm
View
What values for your tr element are written to the response? Can you see if your table row actually has the 'highlight' value set to the rows class attribute? Your issue could be caused by the logic that sets the rows class attribute or it can be caused by the way your css styles are applied (if you have styles on your td elements you may be overriding the tr style). To be sure you need to first determine if the value 'highight' is actually being writing to the HTML response.
idenizeni
4-Feb-14 12:19pm
View
What is in your page load event? Are you checking for post backs before you populate the drop list?
idenizeni
31-Jan-14 15:39pm
View
Can you post a sample of the XML? XPath is case-sensitive, so be sure your XPath has the exact same casing as the XML source.
idenizeni
26-Jan-14 5:30am
View
If it works in development and not in production then I would look at the production environment before I start changing the code.
I think this is your first problem...
// you catch the exception but do nothing with it!
catch (Exception ee)
{
}
My guess is you are getting an error in production but you can't see what the problem is because you don't log or show the error anywhere. See if you can capture the error message and come back and update your question with it.
idenizeni
23-Jan-14 14:07pm
View
Should this be tagged as C# or C?
idenizeni
22-Jan-14 17:45pm
View
I just saw your reply. If you use the Reply on a comment then a message gets sent to the poster. As for your question; from what I can tell it looks like the issue may be related to the fact that LIMIT cannot be parameterized in MySQL. So, it works in your test because you are using literal values in the LIMIT clause.
idenizeni
21-Jan-14 17:27pm
View
Are you missing a statement delimiter after the END keyword? Should the last line be END;
idenizeni
17-Jan-14 16:53pm
View
I did test it and it didn't crash. Why does it crash on you?
idenizeni
15-Jan-14 18:59pm
View
You can also try using the below test code to list the files in the directory to verify this...
// code to list files
string[] files = Directory.GetFiles(@"C:\TestFolder\");
foreach (string file in files)
{
MessageBox.Show("Filename: " + file);
}
idenizeni
15-Jan-14 18:50pm
View
Sidtrey may still be on to something, can you see the file extension for files in other directories? Are you sure your settings are set to show file extensions?
idenizeni
6-Jan-14 11:48am
View
Deleted
That looks an awful lot like my answer.
idenizeni
3-Jan-14 18:16pm
View
Nice! Your solution would work in many more cases than mine.
idenizeni
2-Jan-14 19:08pm
View
You're welcome :)
idenizeni
30-Dec-13 11:41am
View
Thanks.
idenizeni
27-Dec-13 11:41am
View
Ah, good point, you are correct. I'm in web mode and obviously overlooked that bit.
idenizeni
16-Dec-13 18:53pm
View
Do you have the Dock or Anchor properties set on the panel? The panel is nothing more than a child control on the form, like any control on the form. If you have it set to use Dock or Anchor to fill the whole form then you will not see other controls on the form. As for adding the text box to a specific panel, you just need to drag the textbox onto the panel you want it to be a child of.
idenizeni
19-Nov-13 14:17pm
View
Could the issue be related to a particular file? If so, could it be possible the particular file that caused this issue for the user has something in the filename that 'breaks' the redirect to sFilePath and thus causes the page to redirect back to itself which in turn causes the EmailMgr routine to be repeatedly called? Or, did the user manipulate the query params such that the redirect caused the page to call itself repeatedly? You may want to look at saving the filename in the viewstate or session variable to prevent users from manipulating the URL and thus breaking the redirect process.
idenizeni
12-Nov-13 16:21pm
View
If you run the query directly against the database do you see duplicate records? It looks like the issue may be in getting duplicate records in the database call.
idenizeni
1-Nov-13 11:48am
View
Glad I could help.
idenizeni
29-Oct-13 17:50pm
View
Handler .ashx files are not 'pages' like the .aspx files are. The handler files don't inherit from the Page object and they don't have a Controls collection to put controls into. If you want to display a DataGrid then you may want to use an .aspx page.
idenizeni
29-Oct-13 14:59pm
View
You can check the filename's extension before the client uploads the file but you cannot tell if the file has been renamed with a different extension until the file is on the server. You don't have access to read the file contents until it has been uploaded. You will need to check the file extension on the client and check the extension is valid for the file contents once it has been uploaded to the server. I would review Nick Fisher's posted solution as it seems to be doing this.
idenizeni
25-Oct-13 13:13pm
View
I've updated my answer, sorry for the bad code. I've tested the updated code on my system and it works.
idenizeni
24-Oct-13 20:23pm
View
When you set the path as '~/Folder/LogOut.aspx' it's not seen as an absolute path on the client and so it prefixes the relative path the browser is currently at. I'm guessing you are at some url like 'http://siteroot.com/Project1/Files/'. If this is the case then check my posted solution below.
idenizeni
17-Oct-13 20:12pm
View
Good point.
idenizeni
17-Oct-13 20:11pm
View
Thanks for the 4 and for the information.
idenizeni
11-Oct-13 18:54pm
View
You're clearing the response with this line...
Response.ClearContent();
So anything that was in the response (e.g. the GridView) has been removed by this line. The text shows because you 'fill' the response with it after you clear the response content.
idenizeni
10-Oct-13 14:00pm
View
This looks like a question copied from a school assignment.
http://msdn.microsoft.com/en-us/library/ms173121.aspx
idenizeni
9-Oct-13 17:55pm
View
"3.capture a image of screen"
This is a terrible idea.
idenizeni
9-Oct-13 11:52am
View
Not completely true as cookies can be used for a session only, you just need to give them a past expire date when they are created.
idenizeni
8-Oct-13 16:34pm
View
Does your ASP.Net process (or the user if you are using impersonation) have permission to write to the directory?
idenizeni
8-Oct-13 15:50pm
View
So, you want to use drag and drop functionally to clone a button and not actually drag and drop the button?
idenizeni
8-Oct-13 11:49am
View
Thank you :)
idenizeni
7-Oct-13 21:45pm
View
Thx.
idenizeni
7-Oct-13 20:41pm
View
Thx, I appreciate it. For the record, once I saw your solution I immediately preferred it over mine.
idenizeni
7-Oct-13 19:57pm
View
I agree with you but in my testing it does show the correct value when I pop the message box from the SelectionChange event. I think the correct value is showing in my testing because I set the SelectedValuePath property and then when I handle the SelectionChange event I read the SelectedValue which is mapped to the ItemID property of the ComboBoxItem object. If you still think I am missing something I am listening. I truly appreciate your feedback and the fact that you have taken your time to educate me, I consider your abilities well beyond my own. Not sure if it matters, but for what it's worth, I am compiling for the 4.0 Framework as I don't have 4.5.
idenizeni
7-Oct-13 18:45pm
View
+5ed. This is a nice solution.
idenizeni
7-Oct-13 18:20pm
View
You are too fast, I just reposted the code to fix the issues I think you encountered. I am guessing the previous code did't compile because this line...
List<comboboxitem> comboItems = new List<comboboxitem>();
The <> brackets freaked the CP editor out and made the items lowercase.
idenizeni
7-Oct-13 18:14pm
View
Yes, I tested it before I posted it and it worked as expected; the value was shown and not the text "ComboBoxItem". I see now that the <comboboxitem> text is not properly cased, this must have happened when I edited the solution here because it was properly cased in my test.
idenizeni
7-Oct-13 11:57am
View
Why the repost?
Check your first post regarding this question...
http://www.codeproject.com/Questions/664707/System-Data-DataRow-does-not-contain-a-definition
OriginalGriff's solution should help you if you know how to cast the values. If not then ask for clarification in the original post.
idenizeni
4-Oct-13 14:51pm
View
You're welcome.
idenizeni
4-Oct-13 2:55am
View
You're welcome :)
idenizeni
4-Oct-13 1:54am
View
You can 'treat' the .ascx control as a page all you want but the ASP.Net framework will never agree with you. If you really want this to work you need to put the @ Page directive in the .aspx page that you are loading the .ascx control into.
idenizeni
3-Oct-13 12:40pm
View
The @ Page directive should go in a page (.ascx) and not a control (.ascx). Also, if you are only trying navigate pages in the gridview then I don't believe you want to set EnableEventValidation to true.
idenizeni
1-Oct-13 11:48am
View
If it were me I would want to understand how the upload widget determines the 'random' filename. My first guess would be the widget uses the date and/or time to generate the filename and doesn't consider the seconds part of the time.
idenizeni
1-Oct-13 11:36am
View
Thx.
idenizeni
30-Sep-13 15:43pm
View
There are many things wrong here. Why are you doing this, may be there is a better approach to what you are trying to do.
If you expect 'y = 2' as input then your if condition will always be false as you would be trying to match 'y = 2' against 'y = 2 = y = 2', which clearly do not match.
Also, the line...
conv = Convert.ToInt32(in2);
would generate an error as 'y = 2' would not convert to a float. You would need to parse out the number and only pass it to the ToInt32() function.
idenizeni
30-Sep-13 15:22pm
View
Do you realize how many vague/incomplete/incoherent questions get asked? You really shouldn't take it personally.
idenizeni
27-Sep-13 13:31pm
View
Not an easy task. I'm not very familiar with Crystal reports. Would it be possible to include all fields in the report and use the fields selected by the user to determine which fields to hide? A bit of a brute force approach that most likely won't work, but your question was so nicely articulated that I felt obligated to say something. I did something similar by taken the user selected fields and dynamically generating a SQL statement from them that was loaded into a GridView which had AutoGenerateColumns enabled.
idenizeni
27-Sep-13 12:25pm
View
I'm guessing you never set the SelectedItem so this is the object that is throwing the error because it is not set to an instance.
idenizeni
4-Sep-13 12:59pm
View
Thanks, you are correct. In my hast I was thinking equal to or less.
idenizeni
3-Sep-13 22:32pm
View
Where do you initialize the document object? The htmlDetail is just a string and you are clearly setting that in your code.
http://www.codeproject.com/Articles/277065/Creating-PDF-documents-with-iTextSharp
http://www.mikesdotnetting.com/Article/80/Create-PDFs-in-ASP.NET-getting-started-with-iTextSharp
idenizeni
3-Sep-13 22:27pm
View
Deleted
Where do you initialize the document object? The htmlDetail is just a string and you are clearly setting that in your code.
iTextSharp tutorial:
http://www.codeproject.com/Articles/18040/Tutorials-on-creating-PDF-files-using-C-2-0
idenizeni
3-Sep-13 17:42pm
View
You could try posting dummy but complete XML that doesn't contain sensitive information. Since the error is related to malformed XML and the XML you posted doesn't contain the complete XML structure (regardless of the details) we can only make guesses. I will say that you should look at the content of your XML, if it contains any of the XML special characters in the node values then you may need to ensure the XML in properly encoded when written. See this link for more information on XML special characters...
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
idenizeni
3-Sep-13 17:27pm
View
No offense, but there is no point in trying to help if we can't trust the code you posted.
The error you receive, 'Malformed element Signature' is saying your XML is not well formed at the element Signature. I don't even see the Signature element in your XML.
idenizeni
3-Sep-13 15:41pm
View
You're welcome :) For future reference, click the 'Have a Question or Comment' button below the solution to post a comment that is associated to that solution. You shouldn't post a comment as a solution.
idenizeni
3-Sep-13 14:14pm
View
Will there always be 3 items or can the number of items change each time? If the number can change then I don't understand why you want to assign to variables as you wouldn't know how many variables to declare in your code. This sounds like a job for a list/array. In your original post you were attempting to split the values into a string array, if you want to put just the values into a list of strings you could do this...
//
string s = "[1] - blah blah [2] - [bbbbbb]";
System.Text.RegularExpressions.MatchCollection matches = Regex.Matches(s, @"\[(\w*)\]");
List<string> words = (from System.Text.RegularExpressions.Match m in matches select m.Groups[1].Value).ToList();
foreach (string word in words)
{
MessageBox.Show(word);
}
idenizeni
3-Sep-13 13:50pm
View
You have an extra open bracket before your SELECT clause. Try this...
string Usercommand = "INSERT INTO People_Event (People_Event.Confirmation,People_Event.People_ID, People_Event.Event_ID) SELECT People_Event.Confirmation,People_Event.People_ID, '" + DropboxEventID + "' FROM People_Event WHERE (People_Event.People_ID = '" + peopleID + "' AND People_Event.Event_ID = '" + eventID + "')";
Also, the code above is going to set the Confirmation field to whatever the original record was, did you want that or did you want new records to be 'no'? If you want new records to be 'no' then you may want this...
string Usercommand = "INSERT INTO People_Event (People_Event.Confirmation,People_Event.People_ID, People_Event.Event_ID) SELECT 'no',People_Event.People_ID, '" + DropboxEventID + "' FROM People_Event WHERE (People_Event.People_ID = '" + peopleID + "' AND People_Event.Event_ID = '" + eventID + "')";
idenizeni
3-Sep-13 13:42pm
View
Thanks for the update.
idenizeni
3-Sep-13 3:41am
View
Just add to the WHERE clause a condition for the column you want...
SELECT column_name, data_type, is_nullable, character_maximum_length FROM information_schema.COLUMNS WHERE table_name='myTable' AND column_name='myColumnName'
idenizeni
3-Sep-13 3:24am
View
Like any other variable...
e.g.
string x = match.Groups[1].Value;
...
int i = -1;
int.TryParse(match.Groups[1].Value, out i);
Is this what you meant?
idenizeni
3-Sep-13 2:57am
View
Close the reader before you make another connection, see my updated solution.
idenizeni
3-Sep-13 2:46am
View
If you are going to mark your post as a solution you should at least post the solution you found.
idenizeni
3-Sep-13 2:11am
View
In your code, no you are not using this as you are setting the value in the GetUserInput form via the private variable. If you only want the UserInput value to be readonly you could delete the set line. However, if you wanted to set the value from the main form when you create and show the GetUserInput form you could use it like so...
GetUserInput f = new GetUserInput();
f.UserInput = "inital value";
f.ShowDialog();
MessageBox.Show(f.UserInput);
... of course you would also have to add code in the GetUserInput form so when it loads the form the textbox.text property is set to the UserInput value.
idenizeni
3-Sep-13 2:06am
View
Thanks :)
idenizeni
2-Sep-13 23:54pm
View
This should work for you, there is no way this INSERT statement is doing the same thing as your UPDATE statement. You are over complicating this. Don't think about it as a record copy, instead think of it as a record insert, only instead of inserting a completely new record you are inserting a new record based off of an existing record.
idenizeni
2-Sep-13 22:48pm
View
Thank you :)
idenizeni
2-Sep-13 19:37pm
View
Are you sure you set the EditIndex before you call the DataBind() on the GridView?
idenizeni
1-Sep-13 19:17pm
View
Thanks!
idenizeni
1-Sep-13 19:08pm
View
interface ISchoolManagementSystem
{
}
Seriously though, your question is too vague.
idenizeni
31-Aug-13 19:09pm
View
Actually the post's title says, 'want confirm boxes in asp.net'.
idenizeni
31-Aug-13 16:15pm
View
How do different instances of your control tell what data is theirs? In other words, when you created the controls what did you do to ensure the controls data would be uniquely identified by each instance on the page. It's seems like your control is only designed to work when one of your controls exists on a page.
idenizeni
31-Aug-13 16:01pm
View
Yep you did, it's marked as the solution. Thanks, and welcome to CodeProject :)
idenizeni
31-Aug-13 15:58pm
View
You're welcome. I went ahead and posted my comment as a solution in case you wanted to mark it.
idenizeni
31-Aug-13 15:50pm
View
In the code you posted you only check the strPathName file exists but then you try to delete three files, are you sure they would all exist based on the one file?
idenizeni
31-Aug-13 15:42pm
View
Are you using a master page with a form control in it? If so remove the form control from the page you setup the file upload in. Edit: And you can post your code here. Update your post and add the code, use the pre tags so the code is styled for easier reading.
idenizeni
30-Aug-13 22:48pm
View
You wouldn't do it in the Show() method. You could make a property in the second form and set it before you call the Show() method. BillWoodruff posted a nice example a few minutes ago, check it out below.
idenizeni
30-Aug-13 19:37pm
View
Think of your form as an object... how would you pass data from one object to another?
idenizeni
30-Aug-13 17:03pm
View
The code where you say you are assigning your date to the label is actually pulling the date from the label. Are you trying to read the date from the label and pass it to your database? is this the issue or are you really having an issue setting the label text? If it's the database update... does your database table allow NULLs in this date field? Is it a date type on the database server?
idenizeni
30-Aug-13 16:46pm
View
Looks like you already go your solution.
idenizeni
30-Aug-13 11:59am
View
Try using the below code in the Page_Load of the master page, I don't think you want to use Server.Transfer() if you are trying to prevent access to a page.
Response.Redirect(ResolveUrl("~/") + "Default.aspx");
idenizeni
29-Aug-13 21:38pm
View
I'm curious why you are trying to do this, what is your goal. There may be a better way to do what you are ultimately trying to do.
idenizeni
29-Aug-13 20:35pm
View
Thanks for the Enabled information. As for the counter, I based my code on the code that was posted which contained the counter.
idenizeni
29-Aug-13 17:28pm
View
Don't attach the timer's event handler in the mouse hover event, you are attaching a new event every time the button is hovered. See my solution below.
idenizeni
19-Aug-13 17:31pm
View
Are you sure you are using the same passPhrase value to decrypt that was used to encrypt the data?
idenizeni
19-Aug-13 16:39pm
View
What would be the criteria to identify the specific file? Filename, file permissions, file content, file type, etc? I am guessing this is for a WinForms application and not a Web Application, correct? Are you just trying to prevent your WinForms application from being able to select the specific files? Or do you have a server application that also has to know what files to exclude?
idenizeni
18-Aug-13 17:22pm
View
Using your example code; if an item was added to the RgbGreScaleMethodType enum but the ToGrey routine wasn't updated then you may want the default case to alert you.
idenizeni
16-Aug-13 18:21pm
View
To clarify...
Your code checks the Excel cell values using an 'if' statement and performs your logic. And you want the code to be adaptable. So as new Excel cell values are added the 'if' conditions can be easily added and/or maintained by the users who maintain the Excel sheet?
idenizeni
16-Aug-13 13:46pm
View
You want to know how to get a cell value from the selected datagrid row and use it in your Where clause? Do you have any code you can post?
idenizeni
16-Aug-13 13:43pm
View
http://www.asp.net/web-api
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
idenizeni
16-Aug-13 12:14pm
View
I'm too new to WCF to be any real help on that.
idenizeni
16-Aug-13 11:54am
View
In the link above there are these six links which contain the coding part you are looking for.
http://msdn.microsoft.com/en-us/library/ms731835.aspx
http://msdn.microsoft.com/en-us/library/ms734686.aspx
http://msdn.microsoft.com/en-us/library/ms730935.aspx
http://msdn.microsoft.com/en-us/library/ms733133.aspx
http://msdn.microsoft.com/en-us/library/ms734663.aspx
http://msdn.microsoft.com/en-us/library/ms730144.aspx
idenizeni
16-Aug-13 1:08am
View
You don't need to fix this in the helper class, that will just complicate your problem. You said...
"dataGrid1.DataSource = table;"
... where is the code where you fill the above table with data?
idenizeni
15-Aug-13 23:56pm
View
How are you filling your datagrid? Where is this code? When you want to sort numbers like numbers the datacolumn must be typed as numeric. If it's typed as a string then it will sort like you are seeing. As your data has both text and numbers in your column you cannot type it as a number, therefore you must do something like RedDk posted. You can do this in C# and if you post the code you use to fill the datagrid we may be able to help.
idenizeni
15-Aug-13 23:47pm
View
Me thinks this should not be tagged as C#.
idenizeni
15-Aug-13 19:53pm
View
One other thing, if the document isn't done loading when you look for the input elements then you will not find the element. Make sure the document has loaded before you fill your HtmlElementCollection with the input elements. You could attach a routine to the DocumentCompleted event that fires the code to check for the input element. This would ensure your documents loaded before you look for you element.
idenizeni
15-Aug-13 14:35pm
View
I realize this solution provides a proper way to convert the type but how does it answer the question the user posted? Why is it considered a solution if it doesn't address the question? Why did ridroy 5ed! a solution that doesn't address the question?
idenizeni
15-Aug-13 12:46pm
View
Where is the code where you populate the sqlDatasource2 object?
idenizeni
15-Aug-13 12:26pm
View
Won't this cause two post-backs to the server?
idenizeni
15-Aug-13 11:51am
View
The StackOverflowException is caused by your code, you are calling multiplyrows() from the CellValueChanged routine and then changing the values on the dgvSales in your multiplyrows(). Your code is 'stuck' in a loop here. Basically, everytime you enter the multiplerows() routine you trigger another call to the CellValueChanged routine which in turn calls the multiplerows() routine, this would repeat forever.
idenizeni
15-Aug-13 11:32am
View
I'm in the process of learning WCF and I found this MS tutorial to be a good start...
http://msdn.microsoft.com/en-us/library/ms734712(v=vs.110).aspx
idenizeni
14-Aug-13 12:19pm
View
Is it possible you created the situation in testing? If during your testing you run the process multiple times and Excel doesn't completely close you may have some 'phantom' excel processes running, and attached to the file. Open Task Manager and end any Excel processes that are running. Now try your delete test. If the issues was caused by the 'phantom' processes then you should have different results this time.
I've experienced this with Word. To solve it I wrapped the Word object in a Singleton Class to ensure it's properly disposed and to prevent multiple Word references.
idenizeni
14-Aug-13 11:53am
View
Excel tries to help and format things that look like numbers. This is what removes the leading zeros. You need to tell excel to treat them like text. See my solution below for examples on how to force excel to treat the values as text.
idenizeni
12-Aug-13 17:56pm
View
Glad to help. You need to get the current user's name and set it to the username variable before you set the sqlSel string. This depends on how you have setup users and security in you site.
If you are using impersonation you could do this to get the user name (note it will include the domain prefix)...
username = HttpContext.Current.User.Identity.Name;
idenizeni
12-Aug-13 17:43pm
View
Well you could do this...
username = "abc";
string sqlSel = "select * from Table2 where username ='" + username + "' ";
...but then you would always return the same user. I am guessing you what to show different users based a users selection. It really depends how the intent of your program.
idenizeni
12-Aug-13 17:36pm
View
You are not setting the username variable before your query is called. How do you set username variable in your program? I don't see the code for that. You need to set the username before you call your query. From your code it looks like the page is loaded and the query called but the username variable is never set. Are you only calling the bindTable2() method from the page load or are there other methods that call it?
idenizeni
12-Aug-13 16:49pm
View
As a test try replacing your SQL query string...
string sqlSel = "select * from Table2 where username ='" + username + "' ";
with this SQL query string (be sure to replace the [username] text with actual username)...
string sqlSel = "select * from Table2 where username ='[username]' ";
Replace the [username] text with literal text of a username you know exists. Run your code, if you get a record the issue is with how you are setting the username variable.
FYI; if you click reply to this comment I will be notified, if you just add a new comment I will not be notified.
idenizeni
12-Aug-13 16:26pm
View
Where is the code where you set the username variable? The issue is probably because you never set the username variable so the query is looking for the record with a blank username and I am guessing there is no SQL record with a blank username. If you do as fyulaba suggests and set a breakpoint at the line after you set the sqlSel value you can see the actual SQL query going to the SQL server.
idenizeni
12-Aug-13 15:27pm
View
What sisir said, increase the timeout on the process so it waits long enough for the AJAX call to respond under slow internet conditions.
idenizeni
12-Aug-13 12:39pm
View
It just looks like your question was formatted so it looks better. It doesn't appear the content changed.
idenizeni
6-Aug-13 12:18pm
View
The loggedin variable would always be null because you mapped loggidin in your first page.
idenizeni
6-Aug-13 12:15pm
View
I'm inclined to believe Rohan Leuva may be onto something. In your first page you create a variable called 'loggedin' and initialize it. But immediately after initializing you set your session object to be 'loggidin', which would be null as it's never been initialized. In your admin page the object would always be null because you never set your initialized object to the session variable in your first page.
idenizeni
5-Aug-13 15:08pm
View
Glad it helped and thanks for the offer. You can accept this solution (Kumar Pankaj Verma's solution) as the solution since his/her comment was the root of the issue and my suggestion only helped after their solution was applied.
idenizeni
5-Aug-13 15:00pm
View
To clarify my understanding...
You have a form (let's call it Form1) with textbox controls and in Form1 you are attaching events to the textboxes. Now you also have a form that inherits from Form1 (let's call it Form1Child) and Form1Child is where you want to override the method and you want to override it for all textboxes in Form1Child, is this correct?
Also, why is SetCustomDisabled a static method? Would it solve your problem if you removed the static indicator and made this method overridable? If so you could override the SetCustomDisabled function in your child form.
idenizeni
1-Aug-13 17:34pm
View
A complete guess as I am in the process of trying to learn WCF and admittedly know little more than the information in the first MS tutorial...
What if you add a baseaddess to the baseaddresses element like so...
baseaddress="http://localhost:2893/TransService1/Service1"
... the only difference being 'http'.
idenizeni
1-Aug-13 17:26pm
View
As for the file save issue; you need to ensure the credentials the web application is running under has write permissions to the file save directory.
idenizeni
1-Aug-13 11:56am
View
If you stop Visual Studio and start it again the development port may change, because of this don't hard-code the full URL (e.g. http://localhost:53734/). Instead use the ResolveUrl() function. Like so...
string rootImgPath = ResolveUrl("~/Images/");
dr1["ImageID"] = rootImgPath + "HereSmiley.JPG";
Edit: I just noticed you have /Mathi/ in your image's path. You may instead need to use this for the rootImgPath...
string rootImgPath = ResolveUrl("~/Mathi/Images/");
idenizeni
31-Jul-13 16:12pm
View
If D:\Website1\ is your site's root then the image's path looks correct to me. Are you certain the 9.gif file exists in the images directory?
idenizeni
30-Jul-13 18:52pm
View
Review the HTML source to ensure you are referencing the correct path to your images directory. Right click the default image in your browser and check the path... is it the correct path to your image?
idenizeni
30-Jul-13 17:14pm
View
Reuse sure helps but it's not the only goal of a programmer.
idenizeni
30-Jul-13 16:59pm
View
Try clearing the list of characters before you fill it...
private void FillChars()
{
myChars.Clear();
for (int i = 0; i < 26; i++)
myChars.Add((char)(65 + i));
}
I see the chars are being removed as they are retrieved but if you only pull 25 chars and there are 26 then one may be left in the list when you fill it again.
idenizeni
22-Jul-13 19:38pm
View
In your Form1_Load event try replacing what you have with the following...
connect()
DataGridView1.DataSource = data
view()
idenizeni
5-Jul-13 19:52pm
View
Are you 100% sure the credentials you are supplying are correct and the email account exists on the live.com?
idenizeni
5-Jul-13 19:49pm
View
Does the user the process is running under have permission to run an UPDATE command on the table? Do you get any errors?
idenizeni
5-Jul-13 18:12pm
View
Don't forget to give Rohan credit, if his answer helped, by marking his answer as an accepted solution.
idenizeni
5-Jul-13 18:10pm
View
If the login popup causes the page to post back then you may have to do something to show the popup after the page is reloaded after the post back.
idenizeni
4-Jul-13 15:05pm
View
My mistake, I was in an ASP.NET frame of mind and misread your question. I think Rohan Leuva's revised answer is your best bet.
idenizeni
3-Jul-13 1:38am
View
If the site is not under the inetpub/wwwroot/ directory you may need to give the APSNET user permissions to access the directory. If possible, compare the directory security settings between the inetpub/wwwroot/ directory and the directory your site is under. If your site is already under wwwroot this comment will be of little help.
idenizeni
13-Oct-10 19:01pm
View
php is not simply a web page format. http://en.wikipedia.org/wiki/PHP
idenizeni
13-Oct-10 18:52pm
View
Isn't this a reply?
idenizeni
13-Jul-10 20:18pm
View
Deleted
Look for the Starter Kits on the site Richard mentioned.
http://www.asp.net/search?q=starter%20kits
http://www.asp.net/community/projects
idenizeni
13-Jul-10 20:00pm
View
You can still subtract months using the DateTime.Now.AddMonths method. Just use a negative value, i.e. DateTime.Now.AddMonths(-3) would subtract three months. I believe this works the same for the other Add methods too.
idenizeni
9-Jul-10 12:11pm
View
I don't think you really want to do it this way, run exe across systems, I could be wrong though. Just run the exe from your workstation and enter the servers name like I showed. Then from your one PC you could check every server on your network by just changing the server name.
Edit; I edited my comment after I read your question. My first response was based on your question title and not on the actual question. My mistake.
idenizeni
8-Jul-10 14:20pm
View
Just append the slash to your drive variable. I don't think you need to worry about the OS. I only asked about the OS becuase I thought it may explain why William Winner had different results than me.
Again, with the slash appended I get the correct results everytime, without the slash appened the process ends up searching the current application's dirrectory and not the C: drive.
idenizeni
8-Jul-10 12:40pm
View
Interesting, when I run the poster's version I end up searching the directory my project's exe is in. When I add the slash at the end I search the 'C:' directory. I'm using XP what OS are you using?
I too ran into a permission issue when it tried to access certain directories.
idenizeni
8-Jul-10 11:03am
View
I understand, I was just posting that code to help show where the issue might be.
Show More