16,015,504 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 Member 10235977 (Top 68 by date)
Member 10235977
30-Mar-21 16:20pm
View
i dont know how well it will serves the purpose of alerting the user, definitely not as good as confirm. Talking of alternatives, i could also have used a PopupExtender in AjaxControlToolkit but it would sound like French princess saying 'If you don't get bread why don't you eat cake.
Anyway thanks for your help.
I have found solution myself anf for sake of people who keep making mistakes like me, the midstake i made was to add
if (Page_ClientValidate()) {
as a result the code acts with presumption of client validation.
I jjust removed this line from code on second thought and it worked.
Member 10235977
30-Mar-21 13:24pm
View
as i clarified earlier i am not getting any error after using System.Linq but i am not getting any images in slide show. I am not able to decipher what mistake i am making by which my images are not being detected by slideshow
Member 10235977
29-Mar-21 16:13pm
View
thanks for your advice.
my using directives in both the cases are as follows:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using AjaxControlToolkit;
using System.Collections.Generic;
using AjaxControlToolkit;
using System.Linq;
in first block, i still get the error. in second block i do not get the error but slide show does not run. it appears the code dows not register images at all.
you may see the results at:
http://www.testslideshow.salvagein.com/Default.aspx for the first code block and
http://www.testslideshow.salvagein.com/Default1.aspx for the second
thanks for help but i am looking foeward to more help to complete my proect.
Member 10235977
29-Mar-21 10:55am
View
i have used System.Linq first. it gave the same errors as i have posted in my question.
Then i used System.Linq with System.Data.Linq. This also gave the same errors.
Member 10235977
20-Mar-21 8:25am
View
No. It will defeat the purpose of limiting time for filling up text box
Member 10235977
26-Feb-21 12:14pm
View
I tried it but it displays images vertically, not horizontally. only difference is that earlier i was getting first image almost 100% width and other images very small almost 0% all together in 100% width whereas now i am getting all images 100% width each but aligned vertically. I even tried display inline. it does not help.
Member 10235977
25-Feb-21 20:35pm
View
what i meant was i want to avoid writing code for each file upload separately. i can upload files by repeating the code 25 times - once or each upload. what i want is a code that will repeat itself 25 times for i=1 to i=25.
Member 10235977
22-Apr-16 11:06am
View
thanks. both the alternatives work. I would prefer the first one, as it uses code behind. but there is a little problem there. The body and subject is displayed with '+' mark after every word like Please + visit + this + page in stead of just giving 'Please visit this page'. How can i get over it.
Many thanks for your help.
Member 10235977
20-Dec-15 6:08am
View
Kindly suggest code for calling Web API OnBeforeUnload event
Member 10235977
20-Dec-15 6:03am
View
Kindly suggest code or tutorial to do this.
Member 10235977
24-Sep-15 14:53pm
View
thanks. it has worked
Member 10235977
24-Sep-15 14:22pm
View
thanks but it has not worked. I tried both the alternatives.
Member 10235977
2-Sep-15 11:21am
View
kindly see my comment under solution 1
Member 10235977
2-Sep-15 11:20am
View
Right click does not give any context menu. however moving mouse over HttpWebRequest shows the path for related dll file, which is available in program. I tried copying that file to Bib but it does not help. I have also tried adding references
System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A
System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
But it does not accept the using directive
System.Net.Http.WebRequest
I continue getting the same error
Member 10235977
25-Feb-15 14:40pm
View
Looks like magento is a web designing service. When someone asked em to provide him with magento ecommerce site, I misunderstood that Magento is some kind of technical know how which may be a different kind of ecommerce site. Thanks. Now it looks like, magento is only a service provider for ecommerce site.
Member 10235977
24-Feb-15 8:56am
View
Many thanks for you guidance sir.
I have been able to make a website with chat using sql server and gridvew with ajax update.
The only problem is that I have not been able to focus on the last row that is added.
Can you kindly guide me on how to focus on last added row in a gridview. When I add ne message, the new message gets added but I am not able to get focus on that row.
Member 10235977
15-Feb-15 8:14am
View
My code for page load is:
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
using (SqlConnection con = Connections.GetConnection())
{
SqlCommand com = new SqlCommand("UPDATE OnOffStatus SET Status=@Status", con);
com.Parameters.AddWithValue("@Status", "on");
com.ExecuteNonQuery();
con.Close();
}
}
}
And my Page UnLoad code is
protected void Page_UnLoad(object sender, EventArgs e)
{
using (SqlConnection con = Connections.GetConnection())
{
SqlCommand com = new SqlCommand("UPDATE OnOffStatus SET Status=@Status", con);
com.Parameters.AddWithValue("@Status", "off");
con.Close();
}
}
I have not been able to use 'flag= true', as I get the error that the name 'flag' does not exist in the current context.
I shall be highly grateful for your help for your help in solving this issue.
Member 10235977
15-Feb-15 6:17am
View
Thanks Sir but it has still not worked for me as Page_UnLoad code still fires on page load itself. I wonder if the code page_UnLoad has to be nested in some command like if(!IsPostBack) as done in Page_Load method. I have tried nesting in if(!IsPostBack) and also if(!IsCallBack) but it does not seem to work. Apparently I need a little more elaboration. Kindly help.
Member 10235977
18-Oct-14 14:44pm
View
Deleted
I have been trying IIS Manager for streaming service. A help in that direction may be more help, as I have made some advancement in that direction. Nevertheless I will try Wcf(Rest) as an alternative, as I have not tried it before. Thanks for your help.
Member 10235977
18-Oct-14 14:41pm
View
Deleted
Subsequent to above, I have installed IIS Media Service 4.1
I have also installed Microsoft encoder.
My IIS manager now shows ASP.NET, FTP, IIS, Manager and Media Service.
The Media Service in IIS Manager shows Bit Rate Throttling, Live Smooth Streaming and Smooth Streaming (3 icons)
When I select my site in IIS manager, Media Service section shows 4 icons. These are Bit Rate Throttling, Live Smooth Stream Publish Points, Smooth Streaming Presentations and Play list,
Basic setting in Live Smooth Stream Publish Points is set to root directory of my site in physical path.
Advanced setting shows ASP.NET 4.0 as Application pool and physical path points to root directory of my site. start automatically status is set to true and enabled protocol is http
With all this, streaming is not shown on site.
I need help to find what i am missing or what additional has to be done to make streaming effective.
Please help
Member 10235977
18-Oct-14 10:28am
View
Deleted
yes I tried but the article says windows media server must connect to encoding software. I do not know how to connect or it gets automatically connected as you install. Secondly the article refers to .isml files only whereas I am trying .aspx file. These two may be the reasons for my failure. Kindly suggest how can I correct myself.
Member 10235977
9-Oct-14 16:12pm
View
I have contacted my server. their reply is that I server is working fine and I have full powers to install any software. I wonder if ffmpeg requires installation of any software on remote computer
Member 10235977
30-Aug-14 6:46am
View
You ignore my first line that was
"i am interested in making an mlm website i asp.net using C#."
You read the the third line without reference to this context.
Now I understand why you commented so adversaly.
Never mind. It happens some times - various reasons.
Apparently you were influenced by adverse remarks of Sergey Alexandrovich kryukov. I ignored his comments because he always does it as a matter of habit but your comments upset me because you have always been modest and decent in giving guidance.
Thaks for all your help in the past.
Member 10235977
29-Aug-14 8:51am
View
Where does w3school talk of MLM website? Or did you think that i am a beginner in website, not a beginner in MLM site. Beginners do not talk about MLM websites. I di not expect my simple question will be interprested this way.
There are people who are tryign to project that it is so advanced that they charge for giving a copy of the code. Now that i have deveeloped my own MLM site and i find that it is nothing but a simple code, I wonder why people have made it look such a big thing that it misleads others to think that it is something like a dll file on sale. I had no problem with the code, it was merely that ads for sale of this simple code that misled me to think that it may be something big or revolutionary for whihc i need assistace.
I posed the same question on another forum and got a simple reply that MLM site is like any other site; just think of logic and develop it. That was an enough educating answer.
Member 10235977
29-Aug-14 8:41am
View
Did i say i dont know how to create a website? Or did i say i dont know how to create an mlm website?
Member 10235977
28-Aug-14 7:58am
View
No thanks. I already developed my own. it took less than an hour. Thanks to people who passed adverse comments. It gave me a challenge to work and learn fast to stop their comments. thank GOD, i did it.
Member 10235977
27-Aug-14 21:02pm
View
I have solved my problem. There are more than 100 references. I am grateful to the authors of following articles. for help.
http://www.vclcomponents.com/s/0__/download_free_mlm_project_source_code_in_asp_net/
http://www.codeproject.com/Articles/31669/Hierarchical-Tree-Represented-by-Modified-Preorder
http://www.rajneeshverma.com/?tag=/Multi-Level-Marketing
http://www.aspnettutorials.com/tutorials/controls/treeview-node-aspnet2-csharp/
I have been able to prepare my first site with help of these articles.
I raised the question initially because my first attempt to find a solution on google led me to sites that were selling a software for mlm and i was confused whether ready made software is the only solution and my mind was not prepared to accept it and i was wondering if my senior experts could help me to guide me to a tutorial.
Now i find it is such a simple thing.
It also gives me a feeling to disagree with my respeted senior that it is illegal to possess knowledge of mlm sites, for if it were so, there would have not been so many tutorials and softwares on sale for this purpose. Apparently no knowledge is illegal, it is only misuse of knowledge is illegal.
My apologies for raising this question to all those seniors who took exception to it.
Member 10235977
27-Aug-14 16:32pm
View
Let me explain. I am a student of course. I never heard of MLM site before in my schol or outside. When i heard it, i wanted to know what it is and how it is developed. It is for academic interest only. Why not learn everything that one comes to know. If i dont ask, i will be ignorant for ever. My teachers always told me that curiosity is the best asset of a student. If something is not taught to me in school or if i have graduated, do i lose the right to learn more? I am sorry if i upset you but i have lot of respect for you and i did not expect you will dissuade me from learning more if i am ignorant of any thing. Moreover i never said i dont know where to start a website. I only asked where to start learning about MLM website. My apologies and regards. If you could help adding to my knowledge i will be grateful. Even otherwise, i will not give up till i get to know what i want to know. If no one helps GOD will. I am sure.
Member 10235977
25-Aug-14 16:05pm
View
Thanks Sir. I have been able to get video files converted by using ffmpeg as per your advice. The files are saved in the output directory prescribed. For playing these files on the webpage, I am use the normal code for displaying video files. The role of ffmpeg for me is limited to converting the format of video files. I wanted to be sure that I am on right track and not making any mistake on fundamentals or there is a better method which can give the comfort like display of videos on Youtube. A line of confirmation from you that i am doing it right, will add to my confidence and I shall be highly obliged. Thanks.
Member 10235977
24-Aug-14 15:55pm
View
Thanks for making me understand that i had gone wrong on the fundamentals of ffmpeg. I wil try to work again on right track and hopefuly get through the problem. Thanks again for correcting me.
Member 10235977
20-Aug-14 7:17am
View
Thanks. it is a good tutorital for beginners like me.
Member 10235977
19-Aug-14 12:11pm
View
Thanks that now i know that i need to learn Scheduled Task and SqlAgentJob. I shall be grateful if you could suggest some tutorial on that.
Member 10235977
19-Aug-14 12:10pm
View
Thanks that now i know that i need to learn Scheduled Task and SqlAgentJob. Kindly suggest some tutorial for that.
Member 10235977
17-Aug-14 13:09pm
View
i have modified my question. Please see the error with reference to this code in the modified question
Member 10235977
7-Aug-14 5:54am
View
Yes you are right. It works. Many thanks.
Member 10235977
6-Aug-14 6:11am
View
Thanks but it did not work for me. I still get the same error: '~/Products.aspx?category=selectedcategory' is not a valid virtual path.
Member 10235977
12-Mar-14 7:25am
View
Sorry for my ignorance but I need some more elaboration.
I tried a simple page. My Default.aspx page has
<asp:TextBox ID="TextBox1" runat="server">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label">
and my code behind (Default.aspx.cs) has
protected void Button1_Click(object sender, EventArgs e)
{
Uri myuri = new Uri(TextBox1.Text, UriKind.Absolute);
Label1.Text = myuri.ToString();
}
When I run this application, I get the error
"System.UriFormatException: Invalid URI: The format of the URI could not be determined"
Kindly help me with further details to enable me to use this technique.
Member 10235977
10-Mar-14 10:50am
View
It worked in Firefox but it did not work in Chrome
Member 10235977
10-Mar-14 10:49am
View
It worked in Firefox but it did not work in Chrome
Member 10235977
6-Mar-14 7:49am
View
No there was no ie specific code. Problem has been solved by deleting the page and rewriting the whole code. what i could understand with my limited knowledge is that There was a kindo of shadow so that when you click on a dropdown list, text written at some other place on same page was being highlighted. Copying the paghe to another page did nto help. I had to rewrite the whole code on a new page. this has solved the problem but i still do not know what was the logic for the problem. It is now working ok so you may not see any problem if you visit the site. url is www.janamjanamkasathi.com. Thanks for your help and concern. Many thanks.
Member 10235977
2-Mar-14 5:26am
View
How do i use page controler class. Any tutorial or reference that can help shall be useful. Thanks
Member 10235977
24-Feb-14 1:57am
View
It is not clear on which page this code is to be placed, because use can logout from any page. I tried plaing this code on login page to which the user is directed on logout but it does not seem to work there, as it prevents back button on one clcik but permits on second click. I have used the other options given on the reference. These also have the same result. I cant imagine placing on each and every page, as there may be hundreds of pages. It did not work for me on the login page.
Member 10235977
24-Feb-14 1:31am
View
Thanks. I was using the same code but i was using on second page whereas it has to be used on the first page to whcih you do not want the users to go back. Many thanks
Member 10235977
13-Feb-14 21:07pm
View
Line 27: myreg.Validate();
Member 10235977
13-Feb-14 8:47am
View
Thanks. My code now is
protected void Button1_Click(object sender, EventArgs e)
{
string regstr = "^[1-9]{7,10}$";
RegularExpressionValidator myreg = new RegularExpressionValidator();
myreg.ValidationExpression = regstr;
myreg.ControlToValidate = "TextBox1";
try
{
myreg.Validate();
}
catch (ArgumentException)
{
ErrorLabel.Text = "Use min 7 and max 10 numbers";
}
}
whatever I type in TextBox1, I get the error
'Object reference not set to an instance of an object'.
it is almost done with your help. Only this one is to be sorted out.
Kindly help once more
Many thansk
Member 10235977
12-Feb-14 19:15pm
View
It will validate an email. What if I want to prevent an email from being validated? this is exactly what I wan to do - prevent an email or phone number. that is why I used code behind and rejected whatever is accepted as valid email. I hope I have made my point clear. There is validation expression for validating email but there is no validation expression to prevent validating an email. that is why I said I used the validation in reverse order, that is rejected whatever was accepted as a valid email id or phone number and accepted the exceptions that were not validated.
Member 10235977
12-Feb-14 19:08pm
View
I have already tried using TextBix1 for specifying ControlToValidate. It gives an error 'cannot implicitly convert type 'System.Web.UI.WebControl.TextBox to string'
Declaring a validation in aspx page can validate a number. I want to prevent numbers. So I have to reject the text that is validated and accept the text that is not validated. This is what I meant by saying I used validation in reverse order. sorry if it has been misunderstood. I could not come across any validation expression that will prevent a 7-10 digit number so that I can use it in the aspx page.
Member 10235977
8-Feb-14 11:41am
View
Many thanks
Member 10235977
8-Feb-14 11:40am
View
I think I have got it partially. The code has to be
SqlDataSource1.SelectParameters["Category"].DefaultValue = CategoryDropDownList.SelectedValue;
I have used [Category] in stead of Category in select parameters and it seems to work.
It works when the field is a string. I still wonder how to use it for integers, as for example if I want o specify select command where [Age]>@Age how to specify the Age parameter. The above code does not seem to work for integer.
I would like to learn it for academic reason and future guidance although my current problem is solved.
Member 10235977
8-Feb-14 10:57am
View
I have tried setting type in the aspx page as follows:
<SelectParameters>
<asp:Parameter Name="Category" Type="String" />
</SelectParameters>
but it did not help, as I get the error
Object reference not set to an instance of an object.
Thanks for your help so far
I am almost done but for specifying the parameter values from code behind
Please do help me
Member 10235977
8-Feb-14 10:39am
View
For specifying the value of parameter from code behind I also tried
SqlDataSource1.SelectParameters["@Category"].DefaultValue = CategoryDropDownList.SelectedValue;
But in this I get the error:
Object reference not set to an instance of an object.
I have also problem specifying the type of parameter (whether int32 or string), which could be a possible reason for this error. Frankly I do not know the code for specifying the type of parameter.
Kindly help.
Member 10235977
8-Feb-14 10:35am
View
Deleted
For specifying the value of parameter from code behind I also tried
SqlDataSource1.SelectParameters["@Category"].DefaultValue = CategoryDropDownList.SelectedValue;
Object reference not set to an instance of an object.
I have also problem regarding how to specify integral or string type of parameter, which could be a possible reason for this error.
Kindly help.
Member 10235977
8-Feb-14 10:08am
View
yes that is where I have problem when I specify the values of select command from code behind. For example when I want to specify a parameter value form code behind I use
SqlDataSource1.SelectParameters.Add("@Category", CategoryDropDownList.SelectedValue);
But with this I still get the error
Must declare the scalar variable "@Category".
apparently I am making some mistake in the code for adding the parameter values.
Kindly correct me
My code would be somewhat like this
protected void Button1_Click(object sender, EventArgs e)
{
SqlDataSource1.SelectCommand = "SELECT etc. "
SqlDataSource1.SelectParameters.Add(the above syntax where I have a hunch that I am making a mistake)
Member 10235977
8-Feb-14 9:51am
View
Deleted
Oh thanks. I was ignoring the fact that select command of an SqlDatasource can be constructed from code behind. I think I will be able to do it now. many thanks Ahmed, sir.
Member 10235977
8-Feb-14 9:40am
View
I need the code for website please.
Member 10235977
7-Feb-14 11:41am
View
Moreover if I use this solution, I will have to make the WHERE class in the select command also dynamic. like for one user it will be SELECT * --- WHERE Category=category1 for other user it may be WHERE Category=category1 OR Category=category2 OR and so on. Is it possible to do that?
Member 10235977
7-Feb-14 11:38am
View
It does not work for me because in my case the number of options for a given filed can vary. One user may choose the option of category1 and category2. The other may choose 3 options like category1, category2 or category3. Still another user may opt for any of the 7 options category 1 to category7. The example given works only when the number of options is fixed like only 2 options in the given example. In my case the field can have 7 values and, thus, there can be many options depending on whether user wants to specify one fields of 2 fields or any other number he likes.
Member 10235977
2-Feb-14 15:35pm
View
For the sake of understanding i created a database with just 5 records and also added a label (Label1) to my code as follows
SqlCommand command = new SqlCommand("SELECT Count(*) from EmailData", connection);
int count = int.Parse(command.ExecuteScalar().ToString());
Label1.Text = count.ToString();
for (int i = 0; i <= count; i++)
{
SqlCommand com1 = new SqlCommand("SELECT Email FROM EmailData", connection);
string email = com1.ExecuteScalar().ToString();
mail.Bcc.Add(email);
Label1.Text += email;
}
mail.Subject = SubjectTextBox.Text;
The value of that Label1 returns is 5a@b.ca@b.ca@b.ca@b.ca@b.ca@b.c
first digit i.e. 5 is the nuber of records and the a@b.c is the first email address that is being repeated. Kinldy help me.
Member 10235977
2-Feb-14 15:25pm
View
I tried to get the value of count and BCC by adding a label. Count gives the totla number of records but the email simply repeats the first email address. the number of time it is repeated is eqaul to number of records. The output in my case was count = 150 and email label that i added haad the value like a@b.ca@b.ca@b.c and it is rep[eated 150 times if the first email address is a@b.c
Member 10235977
2-Feb-14 15:18pm
View
value of count is equal to the number of records in database. 150 in my case.
Member 10235977
2-Feb-14 15:13pm
View
Email Address
Member 10235977
25-Jan-14 5:27am
View
Thanks
solution 1 has worked well. solution 2 and 3 did not work for me, as the string is being taken from database and month 01 is written as 1 only and not as 01, as we can do when we take date string from text box.
many thanks to all for help
Member 10235977
24-Jan-14 8:08am
View
Many thanks OriginalGriff
It has solved not only this problem but many other problems related to update including how to handle apostrophe sign.
Just for the sake of completion, when there are more than one fields to update, I am using the command
"UPDATE myTable SET Fld1=@Fld1, Fld2=@Fld2, Fld3=@Fld2 WHERE UserName=@UN", con
Is there any other way to group when there are more than one fields to update.
Member 10235977
24-Jan-14 8:07am
View
Deleted
Many thanks OriginalGriff
It has solved not only this problem but many other problems related to update including how to handle apostrophe sign.
Just for the sake of completion, when there are mor thatn one fields to update, I am using the command
"UPDATE myTable SET Fld1=@Fld1, Fld2=@Fld2, Fld3=@Fld2 WHERE UserName=@UN", con
Is there any other way to group when there are more thatn one fields to update.
Member 10235977
19-Jan-14 19:44pm
View
I cannot remove address column because it has to be set to null only when address is fake, not in all cases. Address is an important parameter to make sure that user is genuine. Only fake addresses have to be set to null.
Member 10235977
19-Jan-14 19:42pm
View
Deleted
Thanks for the advice. I will use this code in future for all my updates but it has not solved my problem, as it does not give null value, it still gives a blank not NULL.
Member 10235977
19-Jan-14 19:40pm
View
Deleted
Thanks for the advice. I will use this code in future for all my updates but it has not solved my problem, as it does not give null value, it still gives a blank not NULL, as was expected
Member 10235977
19-Jan-14 5:14am
View
Many thanks friends
I have figured out that there is nothing wrong with my code. The problem is with the manner in which the users are using the site.
The code requires some time to execute as it has lot of calculations and the users do not have patience to wait. They click stop button or back button when the code is half executed. I find that some users have clicked the submit button again within 3 seconds, apparently by using back button / stop button in the menu bar. I also suspect that some users are doing it deliberately, as in a couple of cases the submit button has been pressed second time after less than one second.
I have also given the wait message but it has not affected some of the users. I have been able to identify the IP address of such users, as my code records the IP address on page load itself.
If you could kindly suggest how to deal with such users, who do not have patience or who prefer to do this kind of act.
Show More