16,004,647 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 C++ questions
View Javascript questions
View Visual Basic questions
View .NET 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 Prifti Constantine (Top 75 by date)
Prifti Constantine
7-Feb-19 3:28am
View
Which one goes where? Where does the cdn go and where the locan css file?
Prifti Constantine
17-Jan-19 6:01am
View
You have to show me an error or at least some code in order for me to specify why its not working. Problems cannot be solved in general, we need some facts and an approach to it. Did you specify the correct port? Did you enter the sender email? Did you specify the correct password? All these questions have to be asked. Copy paste wont do anything with this kind of code. Feel free to ask whatever you like!
Prifti Constantine
16-Jan-19 9:12am
View
Can we have some code?
Prifti Constantine
16-Jan-19 6:24am
View
Firstly what you are doing is that youre trying to get the Element By ID but in the parameter youre passing something else... Since you know the Id of the element what you should do is:
var UploadElement = document.getElementById("<%= UpLoadButton.ClientID%>");
Now you have the element you want... If you want to get the value then all you have to do is :
var UploadValue = UploadElement.value;
Prifti Constantine
15-Jan-19 10:53am
View
You can always use __DoPostBack("The Id of your control","TheEvent you want to Invoke")
For more information you can always check the documentation of the javascript __DoPostback . I Think this is your solution. For further information feel free to ask.
Prifti Constantine
11-Jan-19 10:24am
View
You have an array of checkBoxes and you want to find a specific one to see if it is checked or not if im correct?
Prifti Constantine
11-Jan-19 10:21am
View
You can provide some code that you think is the cause of the problem.
Prifti Constantine
3-Jan-19 9:33am
View
Also the problem is not well defined.. Some more information would be more than welcome!
Prifti Constantine
3-Jan-19 2:03am
View
Cheers on that!
Prifti Constantine
2-Jan-19 8:18am
View
Can you provide some meaningful Code of your project?
Prifti Constantine
2-Jan-19 8:17am
View
Dont you have a text tag inside the checkedTextBox control that might help?
Prifti Constantine
2-Jan-19 8:14am
View
With this code there is no reason for a loop. if you want to iterate through the controls inside the page then that's another story and you will need to cast the Control to the appropriate inner type.Maybe some more Code and maybe a better understanding of the problem or a better explanation of it might help.
Prifti Constantine
2-Jan-19 6:08am
View
No problem! If you could Mark as answered that would be awesome! Take care
Prifti Constantine
2-Jan-19 5:49am
View
If you already have the array and the values you want then you can use:
Serializing Data:
var Wantedfields = Array.serializeArray();
hidenControl.value = Wantedfields;
On the Code behind then you can deserialize the hidenCOntrol.Value through a javascript serializer.
Prifti Constantine
2-Jan-19 5:04am
View
So what you are saying is that those radio buttons are created dynamically from code behind. You must probably iterate the Data Array in order to get each value out of it.. Build Another Array put the checked values inside and then Serialize the Array and put it inside the Hidden Control. When that is done you can get the serialized Array in the Code Behind , Deserialize it to your wanted object (Array of string in this situation) and then you can iterate the array in order to get the Values you want. Hope this helps...
Prifti Constantine
2-Jan-19 4:13am
View
If the radioButton has the tag "runat='server'" then you can simple get the control value in the code behind by typping its id.
if you have a <asp:HiddenField runat="server" ID="HiddenControlName" /> or a radiobutton , Control Types do not matter, if the runat=server tag is included then you can use string hiddenValue = HiddenControlName.value.ToString();
Either that or some more code is needed for the solution of your problem.
Prifti Constantine
2-Jan-19 3:50am
View
If the specified control exists then why would you need javascript? Could you please explain your way of thinking? you want to send it through ajax maybe? Create a __doPostback() maybe?
Prifti Constantine
2-Jan-19 2:47am
View
Some changes might have been made to your web.config or your app.config . This error occured to me when installing a nugget and the web.config was not modified appropriately. Older version and newer version must match on your web.config or else it looks for a specific version and it never finds it. One solution would be to delete the nugget and reinstall it or another one would be to modify manually your config file and type the version by hand and rebuild it. I hope this fixes your issue.
Best Regards
Prifti Constantine
2-Jan-19 2:25am
View
I would recommend Serializing the array Data , Store it inside the hiddenControl.Value
and then Deserialize it when retreiving it in the code behind.
Prifti Constantine
20-Sep-17 2:39am
View
You should just address the Datatable solely and say
Label11.Text= dt["StID"].ToString();
I dont think there is a need for a dataset in this situation... I hope this helps you out!
Prifti Constantine
18-Aug-17 4:48am
View
This answer seems pretty specific when it comes to removing commas since it will only remove the comma that exists before the "WHERE"...
My solution seems far better in terms of dynamic functionality and nevertheless this answer got a better result than mine... pretty low to downvote to get first place solution :) ... since my answer is far better than yours...
Prifti Constantine
18-Aug-17 2:52am
View
Why are you writing the sql Command in this situation?
Prifti Constantine
17-Aug-17 6:37am
View
Lets say that the data is already in the sql server.... The command you are using here is an Insert Command... In order to fill the checkboxes you need to retrieve Data from the database, not insert it which in this case it is a simple Select Statement. Is this the appropriate (for you) code that you wish to provide? Maybe you forgot something?
Prifti Constantine
17-Aug-17 5:57am
View
The database is the txt file that you read with GetFiles() method?
Prifti Constantine
16-Aug-17 10:30am
View
Of course you can tell him how to format it... Everything is possible.. The code i provided, no matter what type of string it is, it will always remove commas from a string. It does not matter if it is an sqlStatement string or a simple "hello," string.....It will always remove the commas . Since the string is generated then the only thing certain is that you can actually get a hold of the string ,put it in a variable and act on it as you wish...Impossibilities exist for those who wish to quit.
Prifti Constantine
16-Aug-17 9:41am
View
This is just an if statement that checks the string everytime if it has any commas inside of it... You can put this code inside a method or an event and trigger it through some sort of way(many exist buttons,TextBox text change etc...). By this everytime this specific block of code will be executed and it will remove the commas from your string. I hope i was fully understood and that this will help you out!
Prifti Constantine
3-Aug-17 4:58am
View
What would you like to put inside the button??? What kind of Value?
Prifti Constantine
18-Jul-17 6:21am
View
Have you debugged your code? Does it have the data you need?
Another solution would be to use:
throw New Exception("Corrupt Data"); on the condition you want.
I cannot see how much more i can help since i do not know the logic behind this and what are you expencing and why is it in contrast to what youre getting.
Prifti Constantine
18-Jul-17 6:08am
View
It is Corrent... Just replace the "employeeNames.Length > 5 "
to employeeNames.Length <= 4
Or you could add an Else clause in the if statement so that it will return "Corrupt Data" on each other Occasion. It still does what youre asking but with the else clause it seems a little bit more readable.
Prifti Constantine
18-Jul-17 5:51am
View
What exactly is your problem in this code?
Prifti Constantine
13-Jul-17 15:25pm
View
Well then you just have to stick to the solution... Cant think of a way that uses enums along with collections. I might be wrong but i also havent seen it anywhere.. If your problem is only adding more values at runtime then it is solved. If not then just store the (TagType)3 in a temporary variable and then use it accordingly.
var temp = (TagType)3;
Prifti Constantine
13-Jul-17 15:13pm
View
You could create an object that has the properties : __RESERVED__ = 0,
__Raised__= 1,__Closed__ = 2.
try adding them like this in a certain event:
List lst=new List();
lst.add(new object{__RESERVED__ = 0});
lst.add(new object{__Raised__= 1});
lst.add(new object{__Closed__ = 2});
You could try getting them like this:
Use var before variable since it is always better when you want to add or get something in runtime..
Var listQuery =
from values in lst
where Object.Name = "__Closed__"
select student.Value;
listQuery will hold your specified value then in order to use it.
I really hope this will help you out. I couldnt be more specific since the enum was the only thing supplied. Best regards!
Prifti Constantine
13-Jul-17 15:03pm
View
Since you need to add more values to the enumeration at Runtime then probably enum is not the best Idea... I would reccommend a List with your preffered values inside and getting them at runtime with some sort of event . You could fetch the values with Linq Queries. I just find the idea of a collection better since a collection is more manageable and flexible than Enums..
Prifti Constantine
13-Jul-17 10:22am
View
What exactly are you trying to achieve with this Enum?
Prifti Constantine
13-Jul-17 10:17am
View
You could use some Reflection In this situation so you can get the type of the Enum Specific Value and check it wherever you want! If you need a further explanation i could provide it...even though you could only use TypeOf(). This will temporarily add the value you want inside the Enum for as long as the project stays in runtime... It is not going to Generate Code for you... In this situation "F-ES Sitecore user" is right.. You could use some type of collection which is more handy in these situations! Glad to help! It would really help if you validated the answer! Best regards!
Prifti Constantine
12-Jul-17 5:54am
View
You want to show a preview of the photo inside the GridView?
Prifti Constantine
11-Jul-17 6:32am
View
You could create a method that takes two parameters and then make use of the c# random class and generate them completely randomly!
Prifti Constantine
8-Jul-17 2:58am
View
Thanks a lot my friend! :)
Prifti Constantine
7-Jul-17 8:17am
View
Sorry! My bad! Give me some time to fine the correct link... When i press on it , it redirects me to the correct page. I do not know what is the problem...
Prifti Constantine
7-Jul-17 7:29am
View
Thats because on the prin youre printing out the ARRAY and probably thats the refference location of the array. In order to prin out the value of the array you also have to specify the Index of the array in order to get the value that is stored inside. System.out.println(arr[index]);
Prifti Constantine
7-Jul-17 2:52am
View
ORM makes the connection to the database and generates classes that will be able to help you out acting as the data access layer.
Prifti Constantine
6-Jul-17 9:53am
View
You want to Get only the "5MM.jpg" value from the uRL?
Prifti Constantine
6-Jul-17 6:16am
View
Again...if you have the required experience to do so, then you could try creating many projects...A potential drawback in creating ONE project can be that you will probably have to create many connection strings in order to access the 5 databases that you have. This means that one sqlDataSource is not enough and you will have to use an ORM in order to access the databases through the classes that will be generated.If you only create one database then i dont think that the complexity will go very high, so one project should cover your needs.
Prifti Constantine
6-Jul-17 5:57am
View
When you say Databases, do you mean Tables inside the databases? Also, if you want to create libraries in order to split the project into many libraries, it will get more confusing . Spliting into libraries and taking such serious decisions on the project, it always has to do on wether you have the required experience in order to implement your thoughts into code.
Prifti Constantine
6-Jul-17 4:22am
View
I would recommend, in this situation , creating a class that has the properties that you want. For example you could create a class that has 3 properties accordingly :
1)NewsID
2)NewsTitle
3)News
4)Date
When you populate these properties, create a List<newsclass> and add each one of the objects to the List.
From then on , you follow the same way, lvTweets.Datasource = List<newsclass>
and then Bind each parameter wherever you want.
Prifti Constantine
6-Jul-17 3:53am
View
What value does ,LoginDataSet.Tables("Login").Rows.Count + I , return?
Prifti Constantine
6-Jul-17 3:52am
View
What exactly are you trying to achieve?
Prifti Constantine
4-Jul-17 4:30am
View
Nice! Sorry for not replying sooner.. Have been really busy!
Prifti Constantine
3-Jul-17 14:11pm
View
Have a good one my friend! Keep on coding!
Prifti Constantine
3-Jul-17 10:56am
View
Thats because chklbselectsubject.SelectedItems probably returns many values depending on how many values the user has selected. In this situation if the user Selects 2 values then the 2 of them cannot pass as a parameter in the query. What you need to do is take each value, one by one and Change the parameters accordingly.
I am giving you an example:
foreach item in list
{
[where Sub_Name='"+item.ToString+"'"]
}
I hope it is clear enough.
Prifti Constantine
3-Jul-17 8:05am
View
You could change the execute scalar part with the ExecuteReader();
using(sqlDataReader reader = cmd.ExecuteReader())
{
While(reader.Read())
{
int x = Convert.toInt32(reader["price"].toString());
}
}
or Cast the executeScalar() with (int) :
Sum = (int)cmd.executeScalar();
Prifti Constantine
3-Jul-17 6:56am
View
Have you debuged to see what kind of value chklbselectsubject.SelectedItems returns? The way i see it, due to seeing your code for the first time, the error might possibly occur on the selection of the "chklbselectsubject". Also the variable sum doesnt need to be of type object since the sum will probably return an integer value type or mostly double since we are talking for a value type return from the database.
Prifti Constantine
3-Jul-17 4:59am
View
Do you have anymore code that i could see? Or this is just the part that generates the error?
Prifti Constantine
3-Jul-17 4:28am
View
You could iterate the List with a ForEach loop and for reach item that you want to get, you could use the .Distinct(); at the end so it will select A single value per item since you have 3 per item right now.
A way to implement this is :
ForEach var item in ent.REPORTHEADERs
{
var element = (from h in ent.REPORTHEADERs
join d in ent.REPORTDETAILS on h.FIS_NO equals d.FIS_NO
select new
{
h.SUBE_ID,
h.FIS_NO,
h.TERAZI_NO,
h.TERAZI_REYON_NO,
d.URUN_NO,
d.BIRIM_FIYAT,
h.SATICI_NO,
h.MUSTERI_NO,
h.FIS_ADET,
h.FIS_AGIRLIK,
h.TUTAR,
h.IPTAL,
h.ILK_ISLEM_TARIHI,
h.SON_ISLEM_TARIHI,
h.FIS_SAYISI,
h.TERAZI_ADIIP
}).Distinct.ToList();
}
Prifti Constantine
3-Jul-17 4:23am
View
Have you stored the values that you have in the database inside a dataset or datatable in order to use them or even query them?
Prifti Constantine
3-Jul-17 4:17am
View
So the problem is not that it gives more than one item, but that it shows one item more than once?
Prifti Constantine
3-Jul-17 3:58am
View
Does each item of the CheckListBox hold a value of type integer or decimal inside of it?
Or does it Hold the value : "English:1000" as a string type?
Prifti Constantine
30-Jun-17 6:23am
View
This seems kind of confusing.... Since i tested it and it worked just fine on my project.... In this situation ullas Kottary is right.. Try putting the page inside the same folder.
Prifti Constantine
30-Jun-17 6:05am
View
I could provide some help if i had some Code to watch! :)
Prifti Constantine
30-Jun-17 5:51am
View
Is the name of the page valid?
Another way of solving the problem is creating a button and on the event the button calls you could try Response.Redirect("StartPage.aspx");
Prifti Constantine
30-Jun-17 5:33am
View
You want to update the WHOLE database through the datatable you modified in this code? Along with the columns you added in the CS File?
Prifti Constantine
30-Jun-17 5:24am
View
This might be because You are trying to Convert a value that is inside the ViewState["Seller"] to an integer while you are storing it in a string value... Either way... If the ViewState["Seller"] returns an integer Value then it will not be stored inside the String dropDownText youre assigning it, If the ViewState["Seller"] returns a string Value then if the output is not numercal then it will never be converted or even throw an error. I would reccomend debuging it , see what value it returns and assign it to the appropriate type. Another suggestion would be to put this Whole process into a Try-Catch Block so you can manage your exceptions. If you need any clarification , Feel free to ask anytime! :)
Prifti Constantine
29-Jun-17 9:54am
View
Youre welcome!
Prifti Constantine
29-Jun-17 7:10am
View
To my understanding, the specified indexes that you have provided, have returned a value that probably doesnt match with the conversion that you are Trying to accomplish.
Prifti Constantine
29-Jun-17 6:32am
View
Can you provide on which part did the error occur?
Prifti Constantine
29-Jun-17 5:32am
View
Glad to hear that!
Prifti Constantine
29-Jun-17 3:32am
View
My answer is still to user the
string dropDownText = DropList.SelectedItem.Text.ToString();
If the value you want to retrieve is inside the Text attribute of the dropDownList then the above example should work fine..
If the value you want to retrieve is inside the Value attribute of the dropDownList then
this is what you should use:
string dropDownValue = DropList.SelectedValue.ToString();
In each case you have to pay attention to which attribute of the dropDownList you have assigned the Value you want to get.
What i do not understand in your comment is what exactly is SINo of the sellers
Prifti Constantine
28-Jun-17 5:16am
View
It came to me that Seller is apparently the value that you want to retrieve from a control in the aspx file and populate the Seller value in the stringbuilder with it. One problem would be that the value you get in the ViewState["Seller"] might be null or might not contail numerical or grammatical values.
Prifti Constantine
28-Jun-17 5:09am
View
I cannot understand the problem in this section of the code and what does it have to do with the drop down list that you mentioned above. Also i would reccomend using session object to store the date you want instead of ViewState. The only obvious error that i see here is that the parsing of ViewState["Seller"] fails to compile according your mentions.Can i have some clarification on what exactly does Request["Seller"] returns?
Prifti Constantine
8-May-17 8:00am
View
Did you try to enter a <headertemplate> inside the TemplateField and then binding it to your preffered collumn?
Prifti Constantine
19-Apr-17 10:50am
View
Could you please Share some of your code so that we could navigate better through the problem?
Prifti Constantine
6-Apr-17 2:53am
View
You could store the variable inside the Session and then get it from whichever page you would like from.
Prifti Constantine
6-Apr-17 2:50am
View
One Solution would be to create a string builder with the appropriate string that would create the markup in the client and then return that string so that it would be created upon demand. If you would like, i could provide some examples, but i am not sure if thats what youre asking . Best regards!
Prifti Constantine
31-Mar-17 2:26am
View
Thanks for the information! Ill keep it in mind!
Prifti Constantine
29-Mar-17 4:40am
View
Why are you storing the ComboBox.SelectedItem inside the string variable
cb
when you never use that string?
Show More