15,881,600 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 Python 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 amitesh1989 (Top 62 by date)
amitesh1989
28-Jun-17 9:02am
View
Thanks
amitesh1989
28-Jun-17 0:36am
View
what?
amitesh1989
28-Jun-17 0:22am
View
its just an example to give everyone a hint what actually I am looking for
amitesh1989
27-Jun-17 7:16am
View
I have to drop first 2 and show only the last one how can I achieve that
amitesh1989
27-Jun-17 6:08am
View
i am not using c# I am just doing it in sql
amitesh1989
18-Aug-16 6:13am
View
thanks Animesh
amitesh1989
12-Aug-16 3:16am
View
Thanks a Lot for you help can you tell how and where we use CTE
amitesh1989
8-Aug-16 6:04am
View
Thanks :)
amitesh1989
3-Aug-16 6:06am
View
@Suvendu can you please elaborate in details
amitesh1989
26-Jul-16 5:23am
View
@suvendu -This table is just an example their are 1000 data in the table in DB. Database is already create I just need to fetch the data from it and store it in Datatable or how can I use declare command in code behind.
amitesh1989
11-Sep-13 5:33am
View
http://forums.asp.net/p/1934888/5505563.aspx?p=True&t=635144743011050836&pagenum=1 please go to that link it will show you what i want to do
amitesh1989
6-Sep-13 8:28am
View
@gitnajali please take a look at my comment at the bottom of this you will get the overall scenario of my application
amitesh1989
6-Sep-13 8:24am
View
there is no onclick event in hyperlinkfield
amitesh1989
6-Sep-13 8:23am
View
how??
can you explain with an example
amitesh1989
6-Sep-13 6:56am
View
it is hyperlinkfield not hyperlink. See in this application i have a form where user fill that form and press submit button and details save in the database
User can view this details inside a grid-view with a select link to edit details when user click on that hyperlink it will redirect back to form page where submit button convert into Update button using DataNavigateUrlFormatString="~/User/Form.aspx?ID={0}&buttonValue=Update"
now i guess u understand my question
amitesh1989
26-Aug-13 5:06am
View
Thanks for the reply i already view that link before in my case i want to bind link from database and when user click on any of the link ID should match and details of the user can be view with change in url
amitesh1989
2-Aug-13 3:59am
View
I made some changes in my code but their is only one problem in it
I have a menu where i have two pages under user management tab.
1. create user
2. search user
i make some change in my code but their is one think that pamper me is when i click on edit link it redirect me to createuser page where submit button convert into update button with function.
Now when i click on create user page under user Management tab it show me update button so i cant create new user beacuse if btnsubmit.text=="Update" then it will execute update query.
Here is my code:
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (btnSubmit.Text == "Submit")
{
this.Submit();
}
else if (btnSubmit.Text == "Update")
{
this.Update();
}
}
private void Submit()
{
con.Open();
da = new SqlDataAdapter();
dt = new DataTable();
string strSQL = "SELECT * FROM NewUser WHERE UserName = '" + tbName.Text + "'";
da.SelectCommand = new SqlCommand(strSQL, con);
da.Fill(dt);
if (dt.Rows.Count > 0) // Means first name is already present
{
lblmsg.Text = "This user is already added!";
}
else if (dt.Rows.Count == 0)
{
lblmsg.Visible = false;
string username = tbName.Text;
string pwd = tbPassword.Text;
string Confirmpwd = tbConfirmPassword.Text;
string Email = tbEmailID.Text;
string department = ddlDepartment.SelectedValue;
using (SqlCommand cmd = con.CreateCommand())
{
cmd.CommandText = "Insert into NewUser(UserName,Password,ConfirmPassword,EmailID,DepartmentName)values('" + tbName.Text + "','" + tbPassword.Text + "','" + tbConfirmPassword.Text + "','" + tbEmailID.Text + "','" + ddlDepartment.SelectedValue + "')";
cmd.Parameters.AddWithValue("@FirstName", tbName.Text.Trim());
cmd.Parameters.AddWithValue("@LastName", tbPassword.Text.Trim());
cmd.Parameters.AddWithValue("@DomainID", tbConfirmPassword.Text.Trim());
cmd.Parameters.AddWithValue("@EmailID", tbEmailID.Text.Trim());
cmd.Parameters.AddWithValue(@"RoleType", ddlDepartment.SelectedValue);
cmd.ExecuteNonQuery();
}
con.Close();
tbName.Text = "";
tbPassword.Text = "";
tbConfirmPassword.Text = "";
tbEmailID.Text = "";
tbName.Focus();
}
}
private void Update()
{
SqlCommand cmd;
String query;
con.Open();
query = "update NewUser set UserName='" + tbName.Text + "',Password='" + tbPassword.Text + "',ConfirmPassword='" + tbConfirmPassword.Text + "',EmailID='" + tbEmailID.Text + "',DepartmentName='" + ddlDepartment.SelectedValue + "' where ID=" + tbid.Text + "";
cmd = new SqlCommand(query, con);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("~/SearchUser.aspx", false);
}
}
public string ButtonTextValue
{
get
{
if (Session["ButtonValue"] == null)
Session["ButtonValue"] = "Submit";
return Convert.ToString(Session["ButtonValue"]);
}
set
{
Session["ButtonValue"] = "Submit";
}
}
and on page load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
btnSubmit.Text = ButtonTextValue;
}
}
and on search user page rowcommand of gridview has:
if (e.CommandName == "cmdBind")
{
LinkButton lb = (LinkButton)e.CommandSource;
Session["ButtonValue"] = "Update";
Response.Redirect("CreateUser.aspx?ID=" + lb.Text + "");
}
amitesh1989
15-Jul-13 8:46am
View
Thank you @Pallavi
amitesh1989
15-Jul-13 8:17am
View
hi @Pallavi Waiker i guess you didn't under stand my question yes or no is not my question anyways thanks for you reply may be it will also help me some where
amitesh1989
15-Jul-13 7:19am
View
hi @priyanka7777 your solution is good when user click on yes another message box will appear but when i click yes on first message box my folder and images deleted i want if user click on no= i don't want to save images in second message box then only folder and images will deleted can you tell me how to call function so that when user click on yes i want to delete department and then 2nd message box will appear and if user selected yes i want to save images then function will call so save images and the delete folder and images of that department
amitesh1989
1-Jul-13 11:46am
View
and what i FileInfo[] rgFiles = di.GetFiles("*.aspx"); *.aspx here
amitesh1989
1-Jul-13 11:39am
View
Delete the files here using system.io.file.delete()) or how to delete file amol
amitesh1989
25-Jun-13 4:38am
View
i did but its not working Images are not visible in datalist
amitesh1989
20-Jun-13 10:06am
View
hi Prasad the think is that Object objImage = e.Item.FindControl("Image1");
if (objImage != null)
{
HtmlImage img = objImage as HtmlImage;
img.Src = Imagepath;
img.Width = 100;
img.Height = 100;
img.DataBind();
}
when i debbug my code img will show null value that why it wont show images how to change the index of it
amitesh1989
20-Jun-13 9:45am
View
in this if i change my id to ImageName then it will run but didn't show me images
amitesh1989
20-Jun-13 8:33am
View
hi Prasad i got an error that it GetImagePath function that it can not find the path of the image
amitesh1989
20-Jun-13 7:01am
View
http://stackoverflow.com/questions/17192969/how-to-insert-image-before-already-existing-image-in-database/17193239?noredirect=1#comment24900539_17193239
Go to that link you will see my database
schma
amitesh1989
20-Jun-13 6:54am
View
Images/IT/Chrysanthemum.jpg
This is one of my image path save in the database IT sub-folder with image as parent folder
amitesh1989
20-Jun-13 6:26am
View
http://stackoverflow.com/questions/17209459/how-to-put-an-image-into-selected-postition-and-store-in-database/17210510?noredirect=1#comment24930508_17210510
Go to that link there is my code and prcess now tell me
amitesh1989
20-Jun-13 6:25am
View
Deleted
i will show you my whole code wait
amitesh1989
20-Jun-13 4:18am
View
i use update query like this
const string query = "Update imagesTable set Priority = Priority + 1 where Priority >= @Priority;" +
"insert into imagesTable (ImageName, Description, Path, Priority) values (@ImageName, @Description, @Path, @Priority)";
it will update as well as insert but it will not insert at the selected priority from the dropdown list it will add at the last and update the priority
amitesh1989
20-Jun-13 4:15am
View
i have few question for you prasad
1. File path is the full path of images i store in database?
2.Why we use anchor tag here and why is the image link?
3.What parameter i have to pass in the object of findcontrol?
amitesh1989
20-Jun-13 3:41am
View
ok let me try your code
amitesh1989
19-Jun-13 11:56am
View
My data came from database and here you are creating table with datarow
amitesh1989
19-Jun-13 9:22am
View
can you tell me how i can place the whole code prasad it will be a great help
amitesh1989
19-Jun-13 9:19am
View
i want when i upload new image it will add before the selected priority which i select from the dropdown list the image which is present at that priority move down and so as the other images
amitesh1989
19-Jun-13 9:12am
View
i am using priority as SELECT COUNT(Priority) as Tot FROM TestImages
and i am showing those images in gridview using select * from TestImages order by Priority asc
so now can i do that
amitesh1989
19-Jun-13 7:59am
View
Prasad tell me where should i use object objimage link on item databound or on databinding
amitesh1989
19-Jun-13 5:54am
View
suppose if i dont want to hard code that image path because their are x number of folder so how to put path of all the sub-folder of image folder into it. Is their any way to that
amitesh1989
19-Jun-13 5:01am
View
the think is that first i used to store images in images folder now i create different folder automatically on click event of button and now i want show those images from which present in different folder into my datalist and i have some javascript on it to popup that image and show details of it so there will be x number of folder in images folder
amitesh1989
19-Jun-13 4:57am
View
didn't get your point -Store folder name in the variable
amitesh1989
6-Jun-13 4:54am
View
thanks zafar but i want that image over grid
amitesh1989
24-May-13 10:25am
View
thanks nirav but i made some changes in my function which call that regex and it work
amitesh1989
24-May-13 10:24am
View
i made some changes in my function and it done thank
amitesh1989
9-May-13 7:30am
View
i already done that mate by mistake i paste wrong link. And now i explain everything their u can check and if you think you know the answer you can tell me
amitesh1989
9-May-13 7:12am
View
Deleted
i already done that mate by mistake i paste wrong link
amitesh1989
6-May-13 7:47am
View
yes but not in proper format first column it will show me all ticket number then in second column below row of ticket it will show me PNR number and so one
amitesh1989
3-May-13 9:54am
View
yes i got your point i already try your upper code and to call all regex in one function is very difficult that's why i take different function to call each regex
amitesh1989
3-May-13 7:20am
View
this is my whole code i want to show data in datagridview in sequence
amitesh1989
3-May-13 3:52am
View
according to use regex it will give me all ticket number not between the second last and last md
amitesh1989
3-May-13 3:51am
View
i don't use database so i don't have sql query i have a class in which i call different function and in those function i use regex to get fixed pattern of string and then i create datatable for all the function and get result in those datatale. i guess i am clear if not then let me know i will post my full code
amitesh1989
2-May-13 11:59am
View
i can view data in the data in grid but not in correct format ok can i ask u one question can i call two function on one datatable
amitesh1989
2-May-13 11:56am
View
what is dtcmd here
amitesh1989
2-May-13 11:33am
View
the think is that if i send dt then it will show all the datatable
amitesh1989
2-May-13 11:14am
View
in that link it show how to add two table and store in third one the think is that databind didn't work in window form application
amitesh1989
2-May-13 11:00am
View
[0-9||0]{14} regex used to find ticket number like 125-8928292889 in this regex {14} indicates number of string i only want {14} string that's why i use {14} and i cant take the last )>md i have to take all the history of ticket
amitesh1989
1-May-13 8:26am
View
i know but i just need a regex for it because my query is different then what that tool gave it to me
amitesh1989
19-Apr-13 6:07am
View
i wont be able show next data when page load in grid-view when i enter details in text-boxes and press submit button
amitesh1989
28-Mar-13 8:57am
View
thanks i made some changes and it work thanks for your reply
amitesh1989
28-Mar-13 6:49am
View
cause when i use this i got this error Invalid column name 'TRAVELONG'.
amitesh1989
28-Mar-13 6:48am
View
if i am not using sqlconnection than i guess i have to bind boundfield with gridview field am i rite !!!???
amitesh1989
28-Mar-13 6:06am
View
i get this error Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition.
Show More