15,949,686 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 V5709 (Top 71 by date)
V5709
30-Oct-18 1:42am
View
I want to persist collection of nested objects in memory cache for the benefit of performance.The issue is whenever I update child object ,to reflect it in parent object I need to fetch it again from child object cache. SO is it possible to get updated child object without accessing child object cache for parent object.
* Both parent and child objects are having their independent cache.
V5709
30-Oct-14 3:09am
View
for writing to text file..
FileStream fs = new FileStream("*Your file path*", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter m_streamWriter = new StreamWriter(fs);
m_streamWriter.BaseStream.Seek(0, SeekOrigin.End);
m_streamWriter.WriteLine(*User details encrypted string*);
m_streamWriter.Flush();
m_streamWriter.Close();
& while login, encrypt entered credentials with same encryption logic, & then find out that string in text file.
V5709
29-Oct-14 7:54am
View
you can use concepts like inner join to fetch details which will reduce your code
V5709
29-Oct-14 7:48am
View
can you explain your question more briefly?
V5709
31-Jul-14 5:46am
View
Thanks for reply..
V5709
31-Jul-14 5:46am
View
Thanks for reply..
V5709
2-Apr-14 0:41am
View
Explain your question in details..
V5709
21-Mar-14 1:51am
View
Have you checked that data is coming in ds or not?
V5709
12-Mar-14 5:55am
View
what is the purpose of using session in gobal.asax file?
V5709
11-Mar-14 0:45am
View
to show that you have to repopulate data from data base & have to show it in grid.
V5709
10-Mar-14 6:56am
View
ok... This code is working for insert or update check box related details in data base.
Now you have to done one thing more. After inserting or updating in data base you should rebind your grid.(i think you may have done it on page load also.) here call that binding function again. If you have written row data bound event as explained in above link, then grid binding event will rise an call to row data bound event & there you will have placed your check box checking logic.
V5709
6-Mar-14 7:45am
View
Try to find exact point where functionality is going wrong. Use break point at 'countrylist_SelectedIndexChanged' & check is the selected country id is getting properly or not.
V5709
1-Mar-14 0:00am
View
can you explain about elements distinctItem & globalTablesList?
V5709
28-Feb-14 23:53pm
View
Have you tried with nested cursors?
V5709
28-Feb-14 3:37am
View
Check this one..
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string str = "Data Source=HP-PC\\SQLEXPRESS;Initial Catalog=Enquiry;Integrated Security=True";
SqlConnection con = new SqlConnection(str);
con.Open();
string insertQuery = "insert into EnquiryTable (Name,Emailid,Phoneno,Address,Pincode,Heardfrom,Enquiryabout,Message) values (@Name,@Emailid,@Phoneno,@Address,@Pincode,@Heardfrom,@Enquiryabout,@Message)";
SqlCommand com = new SqlCommand(insertQuery, con);
com.Parameters.AddWithValue("@Name", txtName.Text);
com.Parameters.AddWithValue("@EmailId", txtEmailid.Text);
com.Parameters.AddWithValue("@Phoneno", txtPhoneno.Text);
com.Parameters.AddWithValue("@Address", txtAddress.Text);
com.Parameters.AddWithValue("@Pincode", txtPincode.Text);
com.Parameters.AddWithValue("@Heardfrom", txtHeardfrom.Text);
com.Parameters.AddWithValue("@Enquiryabout", txtEnquiryabout.Text);
com.Parameters.AddWithValue("@Message", txtMessage.Text);
com.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
lblMesage.Text="Error Occured! Try Again" + ex.ToString();
}
}
Add lblMesage as label control in your design page
V5709
28-Feb-14 2:44am
View
put an label field in form.. Use try catch block in code.If error comes ,control will go to catch block. Here add appropriate error message as text to label field
V5709
28-Feb-14 2:26am
View
Check the lengths/size of parameter you are passing with the respective column size in database. I think you trying to save bigger size values in columns having compairatively less size.
V5709
28-Feb-14 2:22am
View
Check the lengths/size of parameter you are passing with the respective column size in database. I think you trying to save bigger size values in columns having compairatively less size.
V5709
28-Feb-14 1:28am
View
you can posting on this site is more than enough. :)You will get your required solution from here. Then also if you want to contact just add an comment under my posted answer with your question title..
V5709
28-Feb-14 1:16am
View
i worked mark it as answer.
V5709
28-Feb-14 1:09am
View
replace some code lines by fallowing..
com.Parameters.AddWithValue("@Name", txtName.Text);
com.Parameters.AddWithValue("@EmailId", txtEmailid.Text);
com.Parameters.AddWithValue("@Phoneno", txtPhoneno.Text);
com.Parameters.AddWithValue("@Address", txtAddress.Text);
com.Parameters.AddWithValue("@Pincode", txtPincode.Text);
com.Parameters.AddWithValue("@Heardfrom", txtHeardfrom.Text);
com.Parameters.AddWithValue("@ENquiryabout", txtEnquiryabout.Text);
com.Parameters.AddWithValue("@Message", txtMessage.Text);
Dont left space between " & '@'
V5709
28-Feb-14 0:55am
View
My friend, check your query first. Replace your sql query by fallowing.
string insertQuery = "insert into EnquiryTable (Name,Emailid,Phoneno,Address,Pincode,Heardfrom,Enquiryabout,Message) values (@Name,@Emailid,@Phoneno,@Address,@Pincode,@Heardfrom,@Enquiryabout,@Message)";
Please mark it as answer if worked for you. :)
V5709
27-Feb-14 7:01am
View
Is there any error which you are getting? If possible post your stored procedure also.
V5709
27-Feb-14 0:53am
View
Please mark solution as answer...
V5709
26-Feb-14 6:21am
View
what issue you are facing? is there is any exception?
V5709
26-Feb-14 6:14am
View
then where thing is going wrong?
V5709
26-Feb-14 5:59am
View
what is the error in this code? you said that you want to insert text value of dynamically generated text boxes into db. But here creation of text boxes & insertion of its values into db are in same function .How it is possible?how you are going to write text in dynamic textbox?
V5709
25-Feb-14 1:35am
View
Deleted
Check page size of grid view in design as well as in code behind if provided
V5709
24-Feb-14 7:41am
View
:o I would like to say big THANKS for getting my answer. And i think i was doing all these things for you as Problem was yours. So please don't picturise it with others :-)
V5709
21-Feb-14 2:31am
View
:)
V5709
21-Feb-14 2:23am
View
obviously yar... just take an look at her Q & soln. 3. Here i am retrieving duplicate records (according to her criteria) using her coding pattern. I returned count of duplicate records by using execute scalar.Logic is simple if count is greater than zero it means duplicate records are present & if count is zero then no duplicate records & then she can execute insert statement.I think still she is confused.. If possible you can also try. May she will understand your answer.. :D
V5709
21-Feb-14 2:09am
View
kaya yar...,here u r laughing & there she is not ready to understand me....now i am getting confused, how to explain her ;)
V5709
21-Feb-14 0:19am
View
from where you are calling that web method? from design or from code behind of aspx page?
V5709
20-Feb-14 23:38pm
View
when u will execute
int count= Convert.toInt32( db.ExecuteScalar("spadminreg", new object[] { Username, Password, UserTypeID, DepID, desigid, emailaddress, PhoneNumber ,"CheckDuplicate"}));
you will get count of records for selected department, designation & user type combination.
V5709
20-Feb-14 7:00am
View
I don't know weather it is right or wrong. If possible update data source in controller method using linq & then send it to view.
V5709
20-Feb-14 2:32am
View
Fine boss :)
V5709
20-Feb-14 0:18am
View
:)
V5709
19-Feb-14 23:31pm
View
look at solution 3. Hope now you will understand what i want to say..
V5709
19-Feb-14 5:48am
View
:) Now, you are doing right.
Here just make one change in stored procedure for 'CheckDuplicate' & replace it by
Select Count(*) from Userss where UserTypeID=@UserTypeID AND DepID=@DepID And DesigID=@DesigID;
Now , come back to your code, your
db.ExecuteScalar("spadminreg", new object[] { Username, Password, UserTypeID, DepID, desigid, emailaddress, PhoneNumber ,"CheckDuplicate"});
function will return an object. Type cast it to integr value & check weather count is zero or greater than zero....
V5709
19-Feb-14 5:12am
View
are baba.. "CheckDuplicate" is only an additional parameter for stored procedure,which will present in your stored procedure also, but not in your db table. In first query execution you will check for existence of department,user type, designation combination in db & depending on return value your code will decide weather record insertion or show duplicate record error.
V5709
19-Feb-14 5:05am
View
Check Solution 2
V5709
19-Feb-14 3:41am
View
no yar, it is just an variable to specify which action is going to be performed. Just add an parameter with action name in your C# code.You need not to change any thing in database.But in C# code first give call to 'CheckDuplicate', it will return records which have same values as your inserting.if returned data set has no records ,it means no duplicate records. & if it contains records it means there is alreay an record with similar entry.
V5709
18-Feb-14 4:45am
View
check this link.. date strings with java script
http://msdn.microsoft.com/en-us/library/ff743760(v=vs.94).aspx
V5709
17-Feb-14 3:50am
View
for this condition, you will need connectivity with internet..
So you can check used product key will not be used again for n number of applications.
V5709
14-Feb-14 7:01am
View
Hi..check this link...
http://weblogs.asp.net/owscott/archive/2005/08/19/Enabling-Roles-in-ASP.NET-v2.0.aspx
V5709
13-Feb-14 5:14am
View
Welcome .. :)
V5709
13-Feb-14 5:00am
View
Look at my new solution ie. solution 5
V5709
13-Feb-14 4:03am
View
For example , store your hard coded key in any dll.Keep it as any variable.In case if you want to upgrade your software then just replace that particular dll.This is for application which is going to work without internet.But if there is an internet connectivity then you can store it in db against your client id
V5709
13-Feb-14 2:33am
View
I have no experience for silver light. But i can suggest you that try to add external references of dll for c# classes involved in doing conversion & then utilize them.
V5709
6-Feb-14 0:19am
View
Hi.. please check accepted solution..
V5709
5-Feb-14 0:01am
View
hi..Thanks for your reply... I got soln(Solution 2
) which is now working...
V5709
4-Feb-14 4:42am
View
This is the way by which right now i have done...(see solution 2)...if i want to do it implicitly then is it possible?
V5709
4-Feb-14 4:33am
View
no yar.. its not working..
V5709
4-Feb-14 2:38am
View
nop...
V5709
4-Feb-14 1:32am
View
Not worked..
V5709
4-Feb-14 1:27am
View
please check question again, i updated it with errors..
V5709
2-Feb-14 7:10am
View
Always adjust placement of controls from design code(not from UI)..Then also if have any difficulty, feel free to ask. :)
V5709
1-Feb-14 6:01am
View
The example that makes the difference most obvious is using string. It's a reference type but you can't change it's value in the same way you can other reference types, you have to create a new instance of the type and change the reference to point to the new instance. If you don't specify ref you can't change where the reference points to. For more refer fallowing code.. hope it will clear your point.!
-----------------------------------
class Program
{
static void Main(string[] args)
{
string changeMe = "ImTheSame";
ChangeString(changeMe);
Console.WriteLine(changeMe); //Prints: Same string as old value
ChangeString(ref changeMe);
Console.WriteLine(changeMe); //Prints: Different string
}
static void ChangeString(string changeMe)
{
changeMe = "ImDifferentNow";
}
static void ChangeString(ref string changeMe)
{
changeMe = "ImDifferentNow";
}
}
------------------------------------------
V5709
1-Feb-14 5:04am
View
refer http://www.atmos.washington.edu/~carey/jQuery-ui/development-bundle/docs/tabs.html
V5709
1-Feb-14 0:31am
View
try this.
------------
DECLARE @MAX_sno int=null;
SELECT @MAX_sno=MAX(person_id) FROM TABLENAME WITH (HOLDLOCK) WHERE companycode='Your_companycode' ;
SET @MAX_sno=@MAX_sno+1;
----------------------
V5709
1-Feb-14 0:20am
View
yes.. you can convert it in time(7) by using sql query.Run following sql query.Hope it will solve your problem..
----------------
declare @time nvarchar(50)=null;
set @time='09:00 am';
SELECT CONVERT(time(7),@time);
---------------------
V5709
31-Jan-14 23:45pm
View
don't do any changes from design UI.. because it may affect your css file.
So always prefer for changes from design code. can you post your code in attachment on your site so that i can check it..? if possible , then post it & give me url..
V5709
31-Jan-14 5:09am
View
Check popups are enabled or not for browser.It worked for me,before giving i tested it.
If not worked then,use anchor tag or hyper link .If you don't want to specify pdf page url in design,then make link as server control by adding 'runat="server"' attribute. Now you will be able to specify redirection url from code behind, like on page load event by accessing that control
V5709
31-Jan-14 2:26am
View
Use this..
----------------
ClientScript.RegisterClientScriptBlock(Page.GetType(), null, "window.open('About.aspx', '_newtab')", true);
-------------------------
V5709
31-Jan-14 0:10am
View
Please refer my second one solution...
V5709
30-Jan-14 0:16am
View
Why it will restrict for putting contents in different line ?
May be i am not getting your question clearly.. So if possible post your design part as just you posted above. Where you want to use image in page & for what purpose? tell me what you want to do in little bit brief..
V5709
29-Jan-14 2:34am
View
My friend, you modified your question later..
V5709
28-Jan-14 4:49am
View
ok.. then you can show alert message using java script from code behind also.Check for blank values during assigning values to controls & if blank then show error alert from code behind. For this check "http://stackoverflow.com/questions/5825165/javascript-alert-showmessage-from-asp-net-code-behind" .
Hope this will help you!
V5709
28-Jan-14 4:11am
View
Which Statements?
V5709
28-Jan-14 1:56am
View
yes, But i am saying to make it invisible in page load it means by default(Not in design, by coding) & not in the function or event so that program will not wait for any other event or function call to hide grid.
V5709
28-Jan-14 1:50am
View
I not found any positioning issue with template specified inprovided URL. It was working fine for me.
URL-"http://www.freecsstemplates.org/preview/stargazer/"
For positioning problem, try by commenting fallowing part in css.
-------------------------
* {
margin: 0;
padding: 0;
}
------------------
** for Direct browsing problem check this link -"http://support.microsoft.com/kb/942062"
Show More