15,893,508 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 Surendra0x2 (Top 166 by date)
Surendra0x2
31-Aug-15 9:40am
View
Thanks for your reply sir but i have already checked CHKDSK command but it is still giving same error
Surendra0x2
6-Aug-15 14:35pm
View
Sir i have designed Product table but stuck with how to manage productAttribute table as a product price will vary according to its attribute like size color and material i tried to design productOptionGroup table which contains optiongroupid and optionGroupName like 1-color 2-size 3-material and other table called Option value table which contains optionid optiongroupid option value like 1-1-Red 2-2-XL and after these two table a combination of both table Productid l Optiongroupid Optionid l Productincrement like 1001 l 1 l 1 l 30$ here 1001 is productid 1 is optiongroupid , 1 is optionid and 30$ is price increment here problem is i want to decide price according to two or multiple attributes but acording to this table structure price is varying with on attibute at a time but i want two or more attribute to decide price like productid 1001 havin in red color and xL size and in cotton then its price will increment means price can vary more than 1 attribute too. But in my table structure only one attribute can be applied to decide price but i want both size and color to vary price. Thanks
Surendra0x2
6-Aug-15 14:15pm
View
Deleted
http://www.webassist.com/community/tutorials/attachments/101/314/var/www/vhosts/webassist.com/user_uploads/tutorials/attachments/101/314/proportion/schema_02061217_w753_h698/schema_02061217_09250649.png
Surendra0x2
11-Mar-15 8:25am
View
error: function () {
windows.location.href = "URL";
}
Use ajax error function
Surendra0x2
11-Mar-15 8:15am
View
https://raasukutty.wordpress.com/2009/06/18/c-calculate-age-in-years-month-and-days/
https://gist.github.com/faisalman/1724253
refer these links...
Surendra0x2
31-Dec-14 7:09am
View
Deleted
Import Excel data to sql table(replica of main table) then perform join with main table to select matched record.
and truncate this Relica table every time when u upload excel file.
Surendra0x2
15-Dec-14 1:57am
View
sir suppose i want to match mobile numbers containing patter aabb-2233 means all possible combinations 1122 or 3344 or 5566
Surendra0x2
13-Dec-14 3:38am
View
Sir it is for c#?when i applied in c# its not returning any matched results..
Surendra0x2
5-Dec-14 3:53am
View
like Mobile Number Starts With 9839 and Rest 6 Digits are AXXXXY means 9839255556 here 5 repeating 4 times I want to build a regular expression it and search in database matching regular expression like this.
Surendra0x2
29-Sep-14 10:04am
View
sir yes it is vulnerable to sql injection but i ll do this using Stored procedure but i want to resolve my current issue i added HttpContext.Current.ApplicationInstance.CompleteRequest after response.redirect but still unable to redirect :(
Surendra0x2
29-Sep-14 9:40am
View
when i placed my code inside try catch block i got error Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
thats y i added Response.Redirect(url, false); false but it did not work.
Surendra0x2
23-Aug-14 14:41pm
View
As you posted your code there is only one Column. then why r u Indexing 1 and 2 just simply
write
protected void GrdView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
grdListings.Columns[0].ItemStyle.Width = 50;
}
}
Surendra0x2
23-Aug-14 14:38pm
View
May be your Giving Wrong Indexing to column.
protected void GrdView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
grdListings.Columns[1].ItemStyle.Width = 50;
grdListings.Columns[2].ItemStyle.Width = 150;
}
}
This code is not wroking?
Surendra0x2
23-Aug-14 9:38am
View
Instead of DataControlRowTYpe.Header use if (e.Row.RowType == DataControlRowType.DataRow)
{
Surendra0x2
22-Aug-14 15:15pm
View
Sir,Yes CommonMethod is a Class and Method inside class is-
public static void ExecuteNonQueryWithTrans(string Sql, SqlConnection sqlconn, SqlTransaction Sqltrans)
{
try
{
SqlCommand sqlCmd = new SqlCommand();
sqlCmd.Connection = sqlconn;
sqlCmd.Transaction = Sqltrans;
sqlCmd.CommandText = Sql;
sqlCmd.CommandTimeout = 0;
sqlCmd.ExecuteNonQuery();
}
catch (SqlException ex)
{
throw new ApplicationException("Data error (Non Query).");
}
}
Surendra0x2
22-Aug-14 14:51pm
View
How?Please Tell me Sir
Surendra0x2
28-Feb-14 4:41am
View
Thanks :)
Surendra0x2
28-Feb-14 4:40am
View
Thanks :)
Surendra0x2
28-Feb-14 3:14am
View
Thanks
Surendra0x2
24-Dec-13 2:30am
View
Thanks Buddy You Saved My ass :)
Surendra0x2
7-May-13 9:24am
View
function addyear()
{
var yr=parseInt(document.getElementById("<%=TextBox1.ClientID %>").value);
document.getElementById("<%=TextBox2.ClientID %>").value=yr+1;
}
Surendra0x2
26-Mar-13 22:47pm
View
Check Regex like [a-zA-Z0-9] with Custom Validator
Surendra0x2
23-Mar-13 9:30am
View
Sir,Its Windows Application not Web.
Surendra0x2
16-Mar-13 5:32am
View
+5
Surendra0x2
9-Mar-13 2:14am
View
Place Dropdownlists Inside Update panel :)
Surendra0x2
7-Mar-13 7:32am
View
:D
Surendra0x2
6-Mar-13 13:01pm
View
Thanks Buddy :)
Surendra0x2
1-Mar-13 5:03am
View
According to my requirement i can't use two update panel bro i can't make u understand :(
Surendra0x2
1-Mar-13 4:34am
View
i did not get what u described suppose we have both button inside update panel and i don't want updateprogress image to appear on delete button then?
like
<asp:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:button id="btnSearch" runat="server" text="Update" onclick="btnSearch_Click" />
<asp:button id="btn" runat="server" text="Delete" onclick="btn_Click" />
Surendra0x2
1-Mar-13 4:10am
View
What the?Don't you know when we refresh page then also postback occurs :D
Surendra0x2
22-Feb-13 12:09pm
View
i looked for sourcecode of codeproject but did not get it,its only using tooltip jquery and data is not inside hidden div.but still on tooltip it fetches the data.
Surendra0x2
22-Feb-13 3:29am
View
http://www.codeproject.com/Questions/550722/Howplustoplusdisableplusthepluscolumnplusheaderplu
check this link
Surendra0x2
22-Feb-13 2:19am
View
My Pleasure :)
Happy Coding :)
Surendra0x2
22-Feb-13 2:16am
View
You Can Download Dew Player check this site-
www.alsacreations.fr/dewplayer-en.html
Surendra0x2
22-Feb-13 2:03am
View
I was about to Edit solution thanks for Editing Amit :)
Surendra0x2
22-Feb-13 1:37am
View
I'm Glad it helped you :)
Happy Coding :)
Surendra0x2
22-Feb-13 1:13am
View
html image?what u saying dude ?ur question is not clear what ur trying to ask.
Surendra0x2
21-Feb-13 8:09am
View
like-
TextBox1.ForeColor = System.Drawing.Color.Green;
or backcolor
like
TextBox1.BackColor = System.Drawing.Color.Yellow;
use according to ur need.
if(some condition)
{
TextBox1.ForeColor = System.Drawing.Color.Green;
}
Surendra0x2
21-Feb-13 8:06am
View
Textbox Text color?
u mean text color?
Surendra0x2
21-Feb-13 3:36am
View
Nitish if u found my answer helpful then accept it :) thanks
Surendra0x2
21-Feb-13 3:27am
View
sql = "Update Tb_SCH_Faculty_Details set [Course_Duration,Allocated_Hours] = '" + textbox2.Text + "','" + textbox3 .Text + "' where Cmn_Minor_Code = '" + txt_coursecode.Text + "'";
You Used Square Bracket here ?
why
if u want to update Multiple Columns then
simply
Update Tb_SCH_Faculty_Details set Course_Duration='" + textbox2.Text + "',Allocated_Hours='" + textbox3 .Text + "' where Cmn_Minor_Code = '" + txt_coursecode.Text + "'";
Surendra0x2
20-Feb-13 11:49am
View
Use have a question or comments widget to comment :| u posted comment in solution .
Surendra0x2
20-Feb-13 6:11am
View
look at the coding i used dataridview which is windows tool
Surendra0x2
19-Feb-13 6:43am
View
i got how i can handle button click event thanks sir...
but how to apply icon and text both in the listbox ...:(
Surendra0x2
19-Feb-13 6:27am
View
Thanks a ton sir You're genius :)
one more thing plz help me in my usercontrol there is a button how to handle that button click event?
Surendra0x2
19-Feb-13 6:12am
View
Do like this-Bind data to Datagridview on formload
public void FillGrid()
{
using (SqlConnection sqlconn = new SqlConnection("server=.\\sqlexpress;database=windowform;integrated security=true"))
{
SqlDataAdapter da = new SqlDataAdapter("select * from reg", sqlconn);
try
{
sqlconn.Open();
DataSet ds = new DataSet();
da.Fill(ds);
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = ds.Tables[0];
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
if (sqlconn.State == ConnectionState.Open)
{
sqlconn.Close();
}
}
}
}
Surendra0x2
19-Feb-13 3:57am
View
Whats the Use of dataGridView1.DataSource = tasksBindingSource;
instead of Make FillDatagrid(); Method on Form Load
then Call it Anywhere to see Updated Data in Datagridview
Surendra0x2
19-Feb-13 3:42am
View
Can you tell me show to load a User control on listbox selecteditem?
Surendra0x2
7-Feb-13 8:30am
View
+5 Dude :)
Surendra0x2
20-Jan-13 9:54am
View
Sir,just i want to know can we generate these types of ids..
i did like but thisis not wrking-
create table autonumberid(id int identity,categoryid as('000'+convert(varchar,id)),productname varchar(20))
Surendra0x2
16-Jan-13 8:22am
View
Thanks Sir,and can u clear my doubt what about mp3 files it would be good if i store mp3 using varbinary(max) format or just store song'name and retrieve.
and for image what if image is between 1 MB to 5MB then it would be good to store as image datatype and retrieve?
Surendra0x2
13-Jan-13 13:00pm
View
use this to save song to database and play
refer this Link i added source code-
http://www.mediafire.com/file/cc43uccvd274epp/Save_Binary_image_and_Mp3_and_Show_image_and_Play_Song_inside_gridview.rar
Surendra0x2
4-Jan-13 3:01am
View
Thanks a ton Marcus u solved my problem :)
Surendra0x2
25-Dec-12 6:57am
View
use sqlcommand.executenonquery(); for DML command like insert update delete
Surendra0x2
22-Dec-12 12:27pm
View
u using accordion control on child page?
Surendra0x2
22-Dec-12 12:22pm
View
Did you attach Script manager?
Surendra0x2
22-Dec-12 12:13pm
View
sir,still it will return all rows not the desired by the user above solution is gr8 :)
Surendra0x2
22-Dec-12 12:10pm
View
+5 :)
Surendra0x2
22-Dec-12 12:06pm
View
It will return all rows.
Surendra0x2
22-Dec-12 11:41am
View
May b type casting issue or ur not filing fload value in the textbox.
Surendra0x2
22-Dec-12 11:08am
View
http://www.dotnetcurry.com/ShowArticle.aspx?ID=149
http://www.dotnetfunda.com/articles/article1001-ajax-calendarextender.aspx
Surendra0x2
22-Dec-12 11:01am
View
Hi,
I suggest you do that in OnClientDateSelectionChanged event. And you could use the js like below:
function checkDate(sender, args) {
if ($find("CalendarExtender1")._selectedDate == null || sender._selectedDate < $find("CalendarExtender1")._selectedDate) {
alert("Please select again!");
sender._selectedDate = new Date();
// set the date back to the current date
sender._textbox.set_Value(sender._selectedDate.format(sender._format))
}
}
Surendra0x2
22-Dec-12 10:45am
View
use this tag to play video file in window media player..take one label control then. follow this(Label1.Text='object code in single line without line break')
cs page-
Label1.Text='<object id='mediaPlayer' width='320' height='285'>
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value='video url' />
<param name='animationatStart' value='true' />
<param name='transparentatStart' value='true' />
<param name='autoStart' value='true' />
<param name='showControls' value='true' />
<param name='loop' value='false' />
</object>'
and paste one video in ur solution explorer.
then play if this wroks then u can upload and save video url to database then u can pass url to window media player embed code.
let me know if this wrks.
refer this video too-
http://www.youtube.com/watch?v=FQxzGuPzs1U
Surendra0x2
21-Dec-12 13:38pm
View
refer this link-
http://irfanyar.wordpress.com/2010/10/19/disable-weekends-for-ajaxtoolkit-calendar-extender/
and
http://net-ajax.itags.org/q_dotnet-ajax_18772.html
Surendra0x2
21-Dec-12 12:39pm
View
You Posted This Question Twice :|
Surendra0x2
20-Dec-12 4:33am
View
My pleasure bro :)
Surendra0x2
18-Dec-12 12:30pm
View
Ye to mai bhi janta hoon rohit bhai :P
Surendra0x2
18-Dec-12 12:27pm
View
if i have to pay $60 then why would i ask this question sir ;)
i also know pay and get rule but i was willing to know is there any software like httrack which can copy entire website ;)
Surendra0x2
18-Dec-12 12:20pm
View
try to deactivate your Antivirus then send mail.
Surendra0x2
18-Dec-12 12:11pm
View
Want to copy website template like themeforest templates
Surendra0x2
13-Dec-12 14:11pm
View
Gr8 :)
Surendra0x2
13-Dec-12 13:43pm
View
i did this as he suggested
http://blog.dreamlabsolutions.com/post/2009/02/24/jQuery-document-ready-and-ASP-NET-Ajax-asynchronous-postback.aspx
but still its not working :(
Surendra0x2
13-Dec-12 12:59pm
View
i'm creating forgot password and on Button click i want to send the password to the user via mail so Sir Button click is main thing here.
My Textbox and Button is inside update panel when i click on Button the toggeled Div Disappears this which i want to appear after partial postback.
Surendra0x2
13-Dec-12 12:08pm
View
I tried Both Sir But Sorry to say Both tricks not working :|
Surendra0x2
13-Dec-12 8:18am
View
Sir,It's not working On first time page load it is showing toogle div but on Button click it is hiding means on postback and afterpostback when i'm hovering on link it is showing and hiding div.
Surendra0x2
13-Dec-12 8:11am
View
Where to add this in script?can u plz help?
Surendra0x2
13-Dec-12 8:07am
View
When i pasted this in header then it is showing error expected expression
sir can u check it ?
Surendra0x2
11-Dec-12 13:31pm
View
;)
Surendra0x2
11-Dec-12 13:17pm
View
window.open('Newwindow.aspx?value=' + value,'_self',true);
Add this
Surendra0x2
10-Dec-12 1:36am
View
:)
Surendra0x2
9-Dec-12 4:12am
View
You're Posting Your Question in Wrong section Always use Post a Question widget :)
Surendra0x2
9-Dec-12 2:46am
View
Exactly :)
Surendra0x2
9-Dec-12 2:36am
View
We don't Need UserName and Password For Windows Authentication
Surendra0x2
8-Dec-12 22:34pm
View
Try Above Solution---
Surendra0x2
8-Dec-12 13:11pm
View
:)
Surendra0x2
8-Dec-12 12:29pm
View
Accept the solution bro if this Helped You :)
and happy coding :)
Surendra0x2
8-Dec-12 6:46am
View
Exactly :)
Surendra0x2
8-Dec-12 6:46am
View
Yes if on Server then You Have to Change Folder permission :)
Surendra0x2
8-Dec-12 6:30am
View
use this link-
http://www.activeservers.com/Set-Perms-Cuteftp.aspx
Surendra0x2
8-Dec-12 6:27am
View
In My Case i'm using Godaddy Hosting here
select the Folder and Click on Permissions then i can change read/write permission
but in ur case i dnt know how to do this coz may be ur hosting server would be different.
Surendra0x2
8-Dec-12 1:17am
View
gr8 Solution Rohit :)
Surendra0x2
7-Dec-12 12:29pm
View
My Pleasure Dude if u found this Link helpful then Accept as solution :)
Surendra0x2
6-Dec-12 7:56am
View
Gr8 Solution Mam :)
Surendra0x2
6-Dec-12 7:14am
View
Try My Above Solution This is Working i tested :)
Surendra0x2
6-Dec-12 7:13am
View
What Means Automatically?Magically :P
or on Button_Click
Surendra0x2
6-Dec-12 6:49am
View
Always Use Have a Question or Comment Widget to Post Your Comment in Reply.
Surendra0x2
6-Dec-12 2:35am
View
Check this Link-
http://www.codeproject.com/Answers/501141/videoplusUploadplusandplusviewplusinplusasp-netplu#answer2
Surendra0x2
5-Dec-12 14:46pm
View
Post your full code so that otherone can understand your problem and can give answer.
Surendra0x2
5-Dec-12 14:39pm
View
yes because value is integer so we need typecasting
Surendra0x2
5-Dec-12 14:27pm
View
Seems Like Weird thing u asked dude :|
Surendra0x2
5-Dec-12 14:23pm
View
slc.Parameters["@Cust_Name"].Value = cmbCust_Name.SelectedValue.Text;
try this
Surendra0x2
5-Dec-12 14:20pm
View
refer this Link
may be this can sortout ur problem
http://social.msdn.microsoft.com/Forums/en/wpf/thread/491bd566-82e3-4f01-88a0-681f56358694
Surendra0x2
5-Dec-12 6:45am
View
My Pleasure :)
Surendra0x2
5-Dec-12 6:30am
View
Buddy But there is one problem arised when i'm clicking on any edit Button then it is only showing first record in pop-up it is only showing first row's Record in each row pop-up :(
Surendra0x2
5-Dec-12 6:11am
View
Ok :)
Surendra0x2
5-Dec-12 6:10am
View
Mam My Label is Inside Update Panel.
and i'm Opening the Content which i palced Inside Update panel in Fancybox so i dnt wanna refresh the page thats y i'm using update panel.
Surendra0x2
5-Dec-12 6:03am
View
Thank You SO Much Buddy U soved My Problem yaar i Removed Bind() Method From itemcommand
and did
Label lbl = (Label)e.Item.FindControl("Label1");
lbl.Text = "Updated";
then it worked but when i'm just writing Label1.Text="Updated" then was not showing
anyways thanks i manipulated the code and it worked thanks
Surendra0x2
5-Dec-12 5:50am
View
LOL :D
Surendra0x2
5-Dec-12 5:05am
View
oops Buddy I'm facing one problem can u help me out
http://www.codeproject.com/Questions/503826/LabelplusTextplusNotplusshowingplusafterplusUpdati
check this n help dude if u can
Surendra0x2
5-Dec-12 5:03am
View
Yes i tested it is showing before updation means if i set Text="Something" then it is showing But when i'm clicking on Update Button then it is not showing
Surendra0x2
5-Dec-12 4:56am
View
Exactly Sir :)
Surendra0x2
5-Dec-12 4:55am
View
Gr8 Answer Sir :)
Surendra0x2
4-Dec-12 14:35pm
View
without where Clause :O
Surendra0x2
4-Dec-12 14:08pm
View
Instead of this Do this-
http://alanfeekery.com/2011/03/28/changing-the-asp-net-target-framework-in-visual-web/
Surendra0x2
30-Nov-12 0:13am
View
Oh Sorry Sir
Surendra0x2
29-Nov-12 13:34pm
View
Here is working Demo-
http://surendrakumarverma.com/Video.aspx
Surendra0x2
29-Nov-12 3:49am
View
Deleted
Suppose you having one textbox on page1.aspx
then on Button Click
protected void Button1_Click(object sender, EventArgs e)
{
string status = TextBox1.Text;
Response.Redirect("page2.aspx?status="+status+"");
}
and on page2.aspx on page_load
protected void Page_Load(object sender, EventArgs e)
{
DropDownList1.Items.Add(Request.QueryString["status"].ToString());
}
Do this u'll Get the value of textbox on page2.aspx in dropdownlist :)
Surendra0x2
29-Nov-12 3:23am
View
Ajax Asycfileupload control is an alternate solution for this problem :)
Surendra0x2
28-Nov-12 13:03pm
View
it is called indian coding Jugaad :P Mudassar Sir did this :D
Surendra0x2
28-Nov-12 13:02pm
View
it is possible gayatri mam
check this link ;)
http://www.aspsnippets.com/Articles/Using-FileUpload-Control-inside-ASP.Net-AJAX-UpdatePanel-Control.aspx
Surendra0x2
28-Nov-12 12:33pm
View
OOps :| thanks by d way :(
Surendra0x2
3-Nov-12 7:17am
View
it worked sir when i changed to british language thanks a ton sir for giving me ur time.
n sorry for bothering you :(
Surendra0x2
3-Nov-12 7:15am
View
british language having format dmy so should i change to british?
SELECT * FROM sys.syslanguages
set language british
can i use this?
Surendra0x2
3-Nov-12 7:11am
View
sir what about ur regional language?as i'm also in india i want to set regional language to india.
Surendra0x2
3-Nov-12 7:03am
View
sir can you write the query u used to execute to get the desired output plz post the query.
Surendra0x2
3-Nov-12 7:00am
View
i changed 02/06/2012 now it is showing first two rows but sir
SELECT * FROM emp_reg WHERE joining_date between Convert(datetime ,'01/01/2012') AND Convert(datetime ,'02/06/2012');
here 01 and 02 are dates so it is giving output according to date and 01 and 06 are months so accroding to me it should return rows from 01 to 06 months. but it is not considering months :| and when converting above varchar datatype to datetime the date will be in format yyyyy/mm/dd..
Surendra0x2
3-Nov-12 6:42am
View
Sir as u updated ur query it is returning rows accroding to dd(date) it is not considering mm(month)
in ur query
SELECT *
FROM emp_reg
WHERE joining_date between Convert(datetime ,'01/01/2012') AND Convert(datetime ,'06/02/2012');
01 and 02 showing months so the above query should return only first 2 rows of table mentioned above but it is returing all rows as 01 and 06 dates containing all rows.
sorry for bothering u sir.
Surendra0x2
3-Nov-12 6:32am
View
i think sqlserver2005 does not support Date datatype....?
Surendra0x2
3-Nov-12 6:28am
View
create table emp_reg(emp_id int identity,emp_name varchar(20), emp_city varchar(20),joining_date date)
when i'm executing this query i'm getting error
Msg 2715, Level 16, State 7, Line 1
Column, parameter, or variable #4: Cannot find data type Date.
i'm using sql server 2005
datetime datatype working fine. but date giving this error.
Surendra0x2
3-Nov-12 6:14am
View
sir if the datatype of joining date is datetime then ?
my sql query is to create table create table emp_reg(emp_id int identity,emp_name varchar(20), emp_city varchar(20),joining_date datetime)
calender control selected date gives format like dd/mm/yyyy n this format is saving in databse like
1 surendra jabalpur 2012-01-06 00:00:00.000
then how can we write the same query for this ?
Surendra0x2
3-Nov-12 5:21am
View
what is to_date in the above query sir?
Surendra0x2
3-Nov-12 5:11am
View
i'm using calender control for textbox and it returns date in 01/12/2012 format
there are two textbox for searching record with given dates..
like from date to todate and in both textbox i'm using calender control in dateformat 01/12/2012 so how can i use this between clause sql query to search from my table?
Surendra0x2
22-Oct-12 15:08pm
View
here is the registration form sir plz can you check the problem.
http://surendrakumarverma.com/Signup.aspx
Surendra0x2
22-Oct-12 15:05pm
View
Thanks Sir...
But sir there is an another problem related to this on key up event when i'm deleting textbox text n making textbox blank then it shows Available
Surendra0x2
20-Oct-12 13:42pm
View
on Keyup if textbox is blank then it is showing available
Surendra0x2
16-Oct-12 2:46am
View
string name = TextBox2.Text;
string to = "surendra.verma1989@gmail.com";
string from = TextBox3.Text;
string subject = TextBox4.Text;
string msg1 = TextBox1.Text;
SmtpClient client = new SmtpClient();
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = true;
client.Host = "smtp.gmail.com";
client.Port = 465;
// setup Smtp authentication
System.Net.NetworkCredential credentials =
new System.Net.NetworkCredential("musicmaniauser@gmail.com", "xyz");
client.UseDefaultCredentials = false;
client.Credentials = credentials;
MailMessage msg = new MailMessage();
msg.From = new MailAddress("musicmaniauser@gmail.com");
msg.To.Add(new MailAddress("surendra.verma1989@gmail.com"));
msg.Subject = TextBox4.Text; ;
msg.IsBodyHtml = true;
msg.Body = string.Format("
Name:
" + name + "<br>
Sender Email:
" + from + "<br>
Subject:
" + subject + "<br>
Message:
" + msg1 + "
");
try
{
client.Send(msg);
lbl.ForeColor = Color.Green;
lbl.Text = "Your message has been successfully sent.";
}
catch (Exception ex)
{
lbl.ForeColor = Color.Red;
lbl.Text = "Error occured while sending your message." + ex.Message;
}
Surendra0x2
16-Oct-12 1:50am
View
The server response was: 5.5.1 Authentication Required. " getting this error on godaddy hosting
Surendra0x2
16-Oct-12 1:47am
View
Sir i know how to send email using gmail in asp.net its working fine on localhost but its not working on godaddy hosting :(
Surendra0x2
11-Oct-12 8:45am
View
Thanks sir i Found the Solution
here it is
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
Label lbl = (Label)e.Item.FindControl("Label3");
if (Convert.ToInt32(lbl.Text) > 2)
{
lbl.BackColor = System.Drawing.Color.Green;
}
}
}
thanks for giving me ur precious tym :) god bless you :)
Surendra0x2
11-Oct-12 8:44am
View
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
Label lbl = (Label)e.Item.FindControl("Label3");
if (Convert.ToInt32(lbl.Text) > 2)
{
lbl.BackColor = System.Drawing.Color.Green;
}
}
}
Surendra0x2
11-Oct-12 8:44am
View
Thanks a Ton Buddy Your Gr8 Sir :) You solved My problem :)
here is my code and its working now :)
Surendra0x2
11-Oct-12 8:01am
View
Thanks sir
Surendra0x2
11-Oct-12 7:58am
View
public void changecolor()
{
string SqlConnect = System.Configuration.ConfigurationManager.ConnectionStrings["Connect"].ConnectionString;
SqlConnection Sqlconn = new SqlConnection(SqlConnect);
SqlCommand sqlcomm = new SqlCommand("select * from Addstock", Sqlconn);
Sqlconn.Open();
SqlDataReader dr = sqlcomm.ExecuteReader();
if (dr.Read())
{
foreach (RepeaterItem item2 in Repeater1.Items)
{
if (Convert.ToInt32(dr["Quantity"].ToString()) > 2)
{
Label lbl = (Label)item2.FindControl("Label3");
lbl.Attributes.Add("style", "background-color:Green;");
}
else if (Convert.ToInt32(dr["Quantity"].ToString()) < 2)
{
Label lbl = (Label)item2.FindControl("Label3");
lbl.Attributes.Add("style", "background-color:Red;");
}
}
Repeater1.DataSource = dr;
Repeater1.DataBind();
dr.Close();
Sqlconn.Close();
}
My Cs page
and
My aspx code is
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table class="rounded-corners">
<tr style="background-color:#F58810" class="rounded-corners">
<th>Select</th>
<th>Stock ID</th>
<th>Category</th>
<th>Product Name</th>
<th>Price(in Rs)</th>
<th>Quantity</th>
<th>Warranty</th>
<th>Purchasing Date</th>
<th>Edit</th>
</tr>
</HeaderTemplate>
<itemtemplate>
<tr>
<td>
<asp:CheckBox ID="CheckBox1" runat="server" /></td>
<td>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("id") %>'></td>
<td><%#Eval("CatName") %></td>
<td><%#Eval("ProductName") %></td>
<td><%#Eval("ProductPrice") %></td>
<td >
<asp:Label ID="Label3" runat="server" Text='<%#Eval("Quantity") %>'></td>
<td><%#Eval("warranty") %></td>
<td><%#Eval("PurchasingDate") %></td>
<td>
<img src="Icons/1349549314_edit.ico" alt="" />
</td>
</tr>
<%-- <itemtemplate>
--%>
<footertemplate>
</table>
}
but still not working sir can u plz check my code that what mistake i'm doing.
Surendra0x2
10-Oct-12 5:12am
View
on ctrl+R i want to clear Label's value
Surendra0x2
10-Oct-12 5:10am
View
i want on Button Click, Label2 will appear and after when i refresh the page i want to clear the label's value
Surendra0x2
10-Oct-12 5:01am
View
label2 sir you can find on above code
Surendra0x2
10-Oct-12 4:55am
View
Sir i want to clear label when page is refreshed by user
first time when i'll click on button then it will show label but when at the same time if i refresh the page then i want to clear the label's value
Surendra0x2
10-Oct-12 4:52am
View
But if i set this then when i'll click on button then label2 will not show message
Label2.text="Stock Detail(s) Deleted";
Surendra0x2
9-Oct-12 2:05am
View
public void changecolor()
{
string SqlConnect = System.Configuration.ConfigurationManager.ConnectionStrings["Connect"].ConnectionString;
SqlConnection Sqlconn = new SqlConnection(SqlConnect);
SqlCommand sqlcomm = new SqlCommand("select * from Addstock", Sqlconn);
Sqlconn.Open();
SqlDataReader dr = sqlcomm.ExecuteReader();
if (dr.Read())
{
foreach (RepeaterItem item2 in Repeater1.Items)
{
if (Convert.ToInt32(dr["Quantity"].ToString()) > 1)
{
HtmlTableCell td = (HtmlTableCell)item2.FindControl("TD1");
td.BgColor = System.Drawing.Color.Green.ToString();
//td.Attributes.Add("style", "background-color:Green;");
}
}
Repeater1.DataSource = dr;
Repeater1.DataBind();
dr.Close();
Sqlconn.Close();
}
}
here is my code sir but its not working :( can u help me plz
Surendra0x2
8-Oct-12 4:10am
View
yes exactly i want this which you mentioned above sir.
Surendra0x2
7-Oct-12 14:57pm
View
Buddy Sorry But i'm not arrogant look above comment that guy said that "And it was so urgent you forgot to ask a question in your haste? How is any of this a problem? Do you not know how to connect to your database (whatever it is)? Do you know know how to write a query? Do you not know how to execute a query?" this thing made me sad thats y i said to him not to comment its not for you Buddy :(
Surendra0x2
7-Oct-12 13:56pm
View
string SqlConnect = System.Configuration.ConfigurationManager.ConnectionStrings["Connect"].ConnectionString;
SqlConnection Sqlconn = new SqlConnection(SqlConnect);
SqlCommand sqlcomm = new SqlCommand("select * from Category", Sqlconn);
Sqlconn.Open();
SqlDataReader dr = sqlcomm.ExecuteReader();
if (dr.HasRows)
{
DropDownList1.DataSource = dr;
DropDownList1.DataTextField = "CatName";
DropDownList1.DataValueField = "Catid";
DropDownList1.DataBind();
ListItem c = new ListItem("Select Category", "0");
DropDownList1.Items.Insert(0, c);
ListItem d = new ListItem("Select Warranty", "0");
DropDownList2.Items.Insert(0, d);
dr.Close();
Sqlconn.Close();
}
this code can tell u what i know and if u want to help then Welcome.
Surendra0x2
2-Oct-12 14:15pm
View
Thanks Buddy i got the solution :)
Surendra0x2
2-Oct-12 13:44pm
View
how to convert
var timeSpent = sw.ElapsedMilliseconds.ToString();
milliseconds to seconds i want to show result in seconds can u help me?
Surendra0x2
1-Oct-12 13:25pm
View
yeah...Buddy Thanks :)
Surendra0x2
1-Oct-12 6:42am
View
i got the solution Buddy u also helped me
<ul runat="server" id="hide">
<li> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="userwelcome.aspx">My Page</li></ul>
i added runat="server" and id to my <ul> tag then set the visibility false when session is null .
if (Session["email"] == null)
{
HyperLink1.Visible = false;
hide.Visible = false;
}
else if (Session["email"] != null)
{
HyperLink1.Visible = true;
hide.Visible = true;
}
Surendra0x2
1-Oct-12 6:22am
View
how to hide Li tag as we hide linkbutton like linkbutton.visible=false;
but there is no li server tag present ...
Surendra0x2
28-Sep-12 6:12am
View
i want to bind data on button click and its working fine but when it shows searched result and if i make textbox blank and then again click on searchbutton then it is showing last search result.
Surendra0x2
25-Sep-12 3:15am
View
Thanks...Buddy :)
Surendra0x2
25-Sep-12 3:15am
View
Thanks..
Surendra0x2
23-Sep-12 23:59pm
View
Thanks
Surendra0x2
23-Sep-12 8:05am
View
So what should i do in order to get design time tool?any download link?
Surendra0x2
21-Sep-12 7:37am
View
Solved..
Surendra0x2
7-Sep-12 6:24am
View
Thanks
Surendra0x2
7-Sep-12 5:24am
View
Thanks sir i got it :)
Surendra0x2
6-Sep-12 2:49am
View
oh again Sorry Mam :(
Show More