15,893,381 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 Priyaaammu (Top 102 by date)
Priyaaammu
26-Mar-13 1:55am
View
Thanks for your reply.
Is there any sample application regarding this....if so,please let me know
Priyaaammu
29-Jan-13 1:58am
View
What is the incorrect thing you find in my question?
Priyaaammu
29-Jan-13 1:45am
View
Thanks for your comment. My doubt was for example if am having only one label server control in aspx page as
<asp:Label ID="lbl" runat="server" Text="Welcome" SkinID="SkinLabel"> and my skin file is
<asp:Label runat="server" BackColor="Blue" SkinID="SkinLabel"/>.
Here backcolor can be set directly by skin,then why css is needed?
Priyaaammu
29-Jan-13 1:45am
View
Thanks for your comment. My doubt was for example if am having only one label server control in aspx page as
<asp:Label ID="lbl" runat="server" Text="Welcome" SkinID="SkinLabel"> and my skin file is
<asp:Label runat="server" BackColor="Blue" SkinID="SkinLabel"/>.
Here backcolor can be set directly by skin,then why css is needed?
Priyaaammu
11-Jan-13 2:13am
View
Ok...but its not working.
Redirect url is right but the textbox value not passing to variable,so getting output as "undefined". Textbox has no id,then how to pass value entered in textbox to next page....guide me
Priyaaammu
11-Jan-13 1:24am
View
what you changed here...this code is same as what i posted
Priyaaammu
10-Jan-13 5:42am
View
This is code in first page to pass values,
var fname=Request.Form('pers_firstname')
var lname=Request.Form('Pers_LastName')
Response.Redirect("PersonDetails.asp?J=Test/PersonDetails.asp&E=Titles&pers_firstname="+fname+"&pers_lastname="+lname+"&"+Request.QueryString);
And below is my code in second page,
var fn = new String(Request.Querystring("Pers_FirstName"));
var ln = new String(Request.Querystring("Pers_LastName"));
var firstname='';
if (firstname.indexOf(',') > 0) {
var Idarr = fn.split(",");
firstname = Idarr[0];
}
else if (fn != '')
firstname = fn;
Am not sure whether my query string is right or not...guide me with correct code
Priyaaammu
10-Jan-13 0:58am
View
Thanks for your comment...am not working in web application. I mentioned in tag that am looking for sage crm application. Like the below link,how to create a screen with more than one tabs
http://www.greytrix.com/blogs/sagecrm/2012/12/26/adding-multiple-screen-blocks-on-the-same-page-based-on-different-conditions-in-com-api/
Priyaaammu
7-Jan-13 3:55am
View
hello...before giving the comment,see the full details what i gave...already mentioned the tag,did you see that?
Priyaaammu
1-Jan-13 23:43pm
View
Ok...i will explain. While logon to crm as a user,there is no Main menu and Administration option to continue or create new user/lead..etc. It is not available to my logon user,how to get it...
Priyaaammu
26-Dec-12 6:11am
View
I gave as,
select
empname as EmpName,emplocation as EmpLocation,deptname as DeptName,basicsalary as BasicSalary,hra as HRA,
netsalary as Total,grade as Grade,convert (varchar(50),dob,103) as DOB,convert (varchar(50),doj,103) as DOJ
from #TempTable where convert(varchar(50),@dateofbirth,103) between '05/05/1865' and '12/02/1989' and convert(varchar(50),@dateofjoining,103) between '08/03/1866' and '05/12/2012'
And while executing my procedure,i gave input as '08/15/1956' for dob and '03/08/1866' for doj...iam getting error as "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value."
Priyaaammu
26-Dec-12 5:40am
View
Thanks...but at which place i have to use where clause,can u explain little brief?
Priyaaammu
26-Dec-12 5:27am
View
Yes...the following is my output without any input parameters
EmpName EmpLocation DeptName BasicSalary HRA Total Grade DOB DOJ
Priya Chennai Develpoment 12500 2875 15375 B 12/02/1989 05/12/2012
Nathan Bangalore Finance 17000 3910 20910 A 05/05/1865 12/04/1996
Vijay Mumbai Developer 14250 3277 17527 A 15/08/1956 08/03/1866
Then,how can i use filter with dob and doj parameters
Priyaaammu
26-Dec-12 5:22am
View
Yes...have to filter records with that input parameters
Priyaaammu
24-Dec-12 7:23am
View
how to get my output in temporary table...
Priyaaammu
24-Dec-12 6:09am
View
Thank u so much.......got with your comment
Priyaaammu
24-Dec-12 5:09am
View
Ok..i have mentioned 2 tables with each having 2 records. I tried with cursor to calculate hra and total salary as below
declare @empname varchar(50)
declare @emplocation varchar(50)
declare @deptname varchar(50)
declare @basicsalary int
declare @hra int
declare @total int
declare @hradetails int
declare @totaldetails int
declare cur_sample4 cursor
static for
select emp.EmpName,emp.EmpLocation,dep.DeptName,emp.BasicSalary,emp.HraDetails,emp.TotalSalary
from Employee_Details emp inner join Department_Details dep on emp.EmpId=dep.EmpId
open cur_sample4
begin
fetch next from cur_sample4 into @empname,@emplocation,@deptname,@basicsalary,@hradetails,@totaldetails
while @@FETCH_STATUS=0
begin
set @hradetails=@basicsalary*23/100
set @totaldetails=@basicsalary + @hradetails
fetch next from cur_sample4 into @empname,@emplocation,@deptname,@basicsalary,@hradetails,@totaldetails
end
end
close cur_sample4
deallocate cur_sample4
--set nocount off
select @empname as EmpName,@emplocation as EmpLocation,@deptname as Dept
,@basicsalary as BasicSalary,@hradetails as HRA,@totaldetails as Total
But am getting only the second row. Guide me what is the mistake in query
Priyaaammu
24-Dec-12 1:57am
View
to show rows one by one..
Priyaaammu
19-Dec-12 5:24am
View
No...it has integer values and now am changed to datatype as nvarchar,but same error
Priyaaammu
19-Dec-12 5:20am
View
Thanks for your reply...i tried your query,but getting same result as "(0 row(s) affected)".
Priyaaammu
19-Dec-12 5:13am
View
Thanks for your comment. I changed datatype to nvarchar, and used query as
update SampleTable2 set Test1=ISNULL(test1,'-'),Test2=ISNULL(test2,'-'),Test3=ISNULL(test3,'-')
All the rows get affected,but no changes in table
Priyaaammu
11-Dec-12 7:32am
View
yes....i tried like this,same error
Priyaaammu
11-Dec-12 7:12am
View
yes...i gave as what you mentioned above,but same error
Priyaaammu
11-Dec-12 7:10am
View
web application...
Priyaaammu
11-Dec-12 6:50am
View
I clicked the accept button only...
I gave the path as "file:///F:/VS2008/TTI_Script(Web)/TTI_Script(Web)/bin/TTI/Import". But still getting error as "URI format not supported". While executing this url directly in web page,it working correctly.....how to solve this
Priyaaammu
11-Dec-12 6:48am
View
I gave the path as "file:///F:/VS2008/TTI_Script(Web)/TTI_Script(Web)/bin/TTI/Import". But still getting error as "URI format not supported". While executing this url directly in web page,it working correctly.....how to solve this
Priyaaammu
11-Dec-12 4:54am
View
Thanks for your great help....at last guide with code of how to pass url to server.mappath code...i gave as
DirectoryInfo di = new DirectoryInfo("http://localhost:2020/F:VS2008/TTI_Script(Web)/TTI_Script(Web)/bin/TTI/Import");
Now error as URI formats not supported
Priyaaammu
11-Dec-12 4:33am
View
string savePath = "~/Export";
using (WebClient client = new WebClient())
{
var path = Server.MapPath("F:\\\\VS2008\\TTI_Script(Web)\\TTI_Script(Web)\\bin\\TTI\\Export");
}
DirectoryInfo di = new DirectoryInfo("F:\\\\VS2008\\TTI_Script(Web)\\TTI_Script(Web)\\bin\\TTI\\Import");
Im getting error in server.mappath line as it not a valid virtual path...
Priyaaammu
11-Dec-12 4:20am
View
I am also tried as what you gave as
F:\\\\VS2008\\TTI_Script(Web)\\TTI_Script(Web)\\bin\\TTI\\Import
But getting error as "...is not a valid virtual path".
Priyaaammu
11-Dec-12 3:58am
View
no...still getting same error
Priyaaammu
10-Dec-12 5:46am
View
I gave importurl="C:/Import",exporturl="C:/Export" in config file
Priyaaammu
10-Dec-12 5:42am
View
This i added in web.config file,
<add key="importUrl" value="C:/Import">
<add key="exportUrl" value="C:/Export">
In my pageload event,i wrote as..
string import_dir = "",importurl = "", exporturl = "", export_dir = "";
import_dir = ConfigurationSettings.AppSettings["importurl"].ToString();
export_dir = ConfigurationSettings.AppSettings["exporturl"].ToString();
string downloadURL = "http://localhost";
var path = Server.MapPath(export_dir);
Priyaaammu
10-Dec-12 5:41am
View
Deleted
This i added in web.config file,
<add key="importUrl" value="C:/Import">
<add key="exportUrl" value="C:/Export">
In my pageload event,i wrote as..
string import_dir = "",importurl = "", exporturl = "", export_dir = "";
import_dir = ConfigurationSettings.AppSettings["importurl"].ToString();
export_dir = ConfigurationSettings.AppSettings["exporturl"].ToString();
string downloadURL = "http://localhost";
var path = Server.MapPath(export_dir);
Priyaaammu
10-Dec-12 5:32am
View
thanks for your reply.........i tried that,but getting error as "...is not a valid virtual path". Can you please send my example code to declare url
Priyaaammu
31-Oct-12 2:54am
View
Im getting error as "The method or operation is not implemented"
Priyaaammu
19-Oct-12 1:03am
View
I tried with this link,but not getting words in indian format. For eg,for Rs.651,im getting eighteen dollars and zero cents. How to get words in indian currency
Priyaaammu
5-Oct-12 8:39am
View
Thanks for your reply....but i got error as 'No Repeat' is not a valid option in ssrs 2008. Also im using RepeatX option only to set background image for all pages. But how to make image invisible for a particular page...
Priyaaammu
13-Sep-12 2:19am
View
Thanks for your reply...
Im using timepicker control by adding Ajaxified dll reference in my web application. While running,im getting javascript error as Microsoft JScript runtime error: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: y
Actual value was 291.5.".
and "Microsoft JScript runtime error: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: y
Actual value was 329.5."
Its my design page,
<asp:TextBox ID="txt1" runat="server">
<Ajaxified:TimePicker ID="timepicker1" runat="server" TargetControlID="txt1"CloseOnSelection="true">
<asp:TextBox ID="txt2" runat="server"> <Ajaxified:TimePicker ID="timepicker2" runat="server" TargetControlID="txt2" CloseOnSelection="true"/>
Priyaaammu
12-Sep-12 4:35am
View
K....but how to make the timepicker control visible false at run time. For example i want to show timepicker only to textbox of tabpanel1,and didnt use for other tabpanel2,tabpanel3 and tabpanel4. At runtime,timepicker shown for all the 4 tabpanels....how to solve it
Priyaaammu
12-Sep-12 2:47am
View
Deleted
I need to know solution for timepicker. This is my aspx page. Im using 4 tabs and using timepicker control only for the below mentioned tab panel. But at run time,timepicker displayed for each tabs. How to make it invisible at run time........
<asp:TabPanel ID="tpanFoodMenuCategory" runat="server">
<HeaderTemplate>
Food Menu Category</HeaderTemplate>
<table align="center" width="60%" border="1" cellpadding="3" cellspacing="3">
<tr class="tr_headers">
<td align="left" valign="middle" colspan="3">
<asp:Label ID="lblFoodMenuCategory" runat="server" Text="Food Menu Category" SkinID="PageTitleLabel">
</td>
</tr>
<tr class="tr_row">
<td align="right" valign="middle" style="width: 40%">
<asp:Label ID="lblFoodMenuCategoryName" runat="server" Text="Food Menu Category:">
</td>
<td align="left" valign="middle" style="width: 40%" colspan="2">
<asp:TextBox ID="txtFoodMenuCategoryName" runat="server" TabIndex="1" CssClass="textforparameter" MaxLength="100">
</td>
</tr>
<tr class="tr_alternate_row">
<td align="right" valign="middle" style="width: 40%">
<asp:Label ID="lblSchoolDays" runat="server" Text="School Days:">
</td>
<td align="left" valign="middle" style="width: 40%" colspan="2">
<asp:TextBox ID="txtSchoolDays" runat="server" TabIndex="2" CssClass="textforparameter" MaxLength="10">
<Ajaxified:TimePicker ID="timepickerSchoolDays" runat="server" TargetControlID="txtSchoolDays"
CloseOnSelection="True" OnClientHidden="" OnClientHiding="" OnClientSelectionChanged=""
önClientShowing="" önClientShown="" CssClass="timepicker">
</td>
</tr>
<tr class="tr_row">
<td align="right" valign="middle" style="width: 40%">
<asp:Label ID="lblHolidays" runat="server" Text="Holidays:">
</td>
<td align="left" valign="middle" style="width: 40%">
<asp:TextBox ID="txtHolidays" runat="server" TabIndex="3" CssClass="textforparameter" MaxLength="10">
<Ajaxified:TimePicker ID="timepickerHolidays" runat="server" TargetControlID="txtHolidays"
CloseOnSelection="True" OnClientHidden="" önClientHiding="" OnClientSelectionChanged="">
</table>
Priyaaammu
12-Sep-12 2:43am
View
Deleted
I need to know solution for timepicker. This is my aspx page. Im using 4 tabs and using timepicker control only for the below mentioned tab panel. But at run time,timepicker displayed for each tabs. How to make it invisible at run time........
<asp:TabPanel ID="tpanFoodMenuCategory" runat="server">
<HeaderTemplate>
Food Menu Category</HeaderTemplate>
<contenttemplate>
<table align="center" width="60%" border="1" cellpadding="3" cellspacing="3">
<tr class="tr_headers">
<td align="left" valign="middle" colspan="3">
<asp:Label ID="lblFoodMenuCategory" runat="server" Text="Food Menu Category" SkinID="PageTitleLabel">
</td>
</tr>
<tr class="tr_row">
<td align="right" valign="middle" style="width: 40%">
<asp:Label ID="lblFoodMenuCategoryName" runat="server" Text="Food Menu Category:">
</td>
<td align="left" valign="middle" style="width: 40%" colspan="2">
<asp:TextBox ID="txtFoodMenuCategoryName" runat="server" TabIndex="1" CssClass="textforparameter" MaxLength="100">
</td>
</tr>
<tr class="tr_alternate_row">
<td align="right" valign="middle" style="width: 40%">
<asp:Label ID="lblSchoolDays" runat="server" Text="School Days:">
</td>
<td align="left" valign="middle" style="width: 40%" colspan="2">
<asp:TextBox ID="txtSchoolDays" runat="server" TabIndex="2" CssClass="textforparameter" MaxLength="10">
<Ajaxified:TimePicker ID="timepickerSchoolDays" runat="server" TargetControlID="txtSchoolDays"
CloseOnSelection="True" OnClientHidden="" OnClientHiding="" OnClientSelectionChanged=""
OnClientShowing="" önClientShown="" CssClass="timepicker">
</td>
</tr>
<tr class="tr_row">
<td align="right" valign="middle" style="width: 40%">
<asp:Label ID="lblHolidays" runat="server" Text="Holidays:">
</td>
<td align="left" valign="middle" style="width: 40%">
<asp:TextBox ID="txtHolidays" runat="server" TabIndex="3" CssClass="textforparameter" MaxLength="10">
<Ajaxified:TimePicker ID="timepickerHolidays" runat="server" TargetControlID="txtHolidays"
CloseOnSelection="True" OnClientHidden="" OnClientHiding="" OnClientSelectionChanged=""
Priyaaammu
31-Jul-12 1:29am
View
I tried with the same link only...but not working. I've 40 records in dataset and i need to display 20 records per page. Like u mentioned in above link,i gave expression in group and set page break also...still am getting total 40 records in a single page
Priyaaammu
26-Jul-12 3:31am
View
Already did that...this is my javascript code
function FirstColor() {
document.getElementById("txtFirst").style.borderColor = "#3BB9FF";
}
This is my aspx code:
<asp:TextBox ID="txtFirst" runat="server" TabIndex="1" SkinID="First_Last_TextBox"
MaxLength="20" OnTextChanged="txtFirst_TextChanged" meta:resourcekey="txtFirstResource1" onclick="FirstColor()">
When clicking on textbox,i got the given color,but when using tab,the color didnt change
Priyaaammu
24-Jul-12 8:05am
View
Didnt get your comment...is it possible to add own image in custom style or not?
Priyaaammu
24-Jul-12 7:07am
View
Reply soon...
Priyaaammu
24-Jul-12 5:30am
View
Thanks for your comment...but if causes validation is set to false means button fired and validations are not working,i need both work to do
Priyaaammu
24-Jul-12 5:30am
View
Thanks for your comment...but if causes validation is set to false means button fired and validations are not working,i need both work to do
Priyaaammu
24-Jul-12 3:22am
View
i tried this code...but even after correct code is given,"not successful" message only displayed...any help
Priyaaammu
24-Jul-12 3:08am
View
In the beginning i set causes validation=true,but my button not getting fired. So i change to false,then my button event fired. I want to do both button event at server side and validation
Priyaaammu
24-Jul-12 0:53am
View
Without using cs code,how to do it only with javascript...
Priyaaammu
23-Jul-12 8:22am
View
i tried this...but only the page getting refreshed and theme not changed
Priyaaammu
23-Jul-12 6:57am
View
Rpy soon...
Priyaaammu
23-Jul-12 5:00am
View
Yes....i have two themes named Ocean and Desert. Now im using Ocean theme and set it in web.config file. But when choosing Desert in dropdown,how to apply to that to whole page
Priyaaammu
23-Jul-12 4:25am
View
Thanks for your reply...i tried by reading your small article,but still i can use only one theme for a page and cant apply another and shows error as "Theme not found in global directory". But i gave both themes and css in App_Themes only.....plz guide how to solve this
Priyaaammu
21-Jul-12 4:57am
View
Sry...its my mistake only. Im using asp.net and ajax controls
Priyaaammu
21-Jul-12 2:49am
View
i saw that,but they used full of html controls. In signup page there is a dropdown to show month. Like watermark,"Month" is displayed in that dropdown and when clicked on that arrows of dropdown,it shows all months. Using asp and ajax controls,how to do it....
Priyaaammu
4-Jul-12 0:51am
View
thanks for your reply...but my task is to update or delete rows not by using separate buttons..i want to keep edit and delete buttons along with grid as like gridview
Priyaaammu
28-Jun-12 1:09am
View
i dont want you to write a book for me...what prevents you to tell the difference in that. I asked to know whether i understand it correctly or not,how do you decide that i didnt read anything? If u cant explain,just leave it...
Priyaaammu
5-Jun-12 5:03am
View
i need your guide soon.....
Priyaaammu
30-May-12 4:18am
View
<div style="height:200px; overflow:auto">
<asp:GridView ID="grdFunctional" runat="server" AllowSorting="True"
AutoGenerateColumns="False" Width="100%" AllowPaging="False">
</div>
Priyaaammu
30-May-12 4:07am
View
yes...still pagination is working
Priyaaammu
30-May-12 3:55am
View
I got error as '0' could not be set an property 'PageSize'
Priyaaammu
16-May-12 3:00am
View
K..but how to set maximum length in design page for numeric?
Priyaaammu
16-May-12 3:00am
View
K..but how to set maximum length in design page for numeric?
Priyaaammu
26-Apr-12 1:15am
View
how to format it...what is the use of formatting the code?
Priyaaammu
12-Apr-12 3:37am
View
Again im back with another doubt. Now my work is to display success message after inserting record and have to declare my connection in another function and to call that in Save event. I tried like this...
protected void btnSave_Click(object sender, EventArgs e)
{
Insert();
}
private bool Insert()
{
string strcon = "Data Source=USER-PC\\SQLEXPRESS;Initial Catalog=Course;User ID=sa;Password=sql2008";
SqlConnection mycon = new SqlConnection(strcon);
mycon.Open();
string strquery = "insert into studentDetails([name],qualification,age,mobileno) values('" + txtName.Text.ToString().Trim() + "','" + txtQual.Text.ToString().Trim() + "','" + txtAge.Text.ToString().Trim() + "','" + txtMobile.Text.Trim() + "')";
SqlCommand cmd = new SqlCommand(strquery, mycon);
if (cmd.ExecuteNonQuery() == true)
{
lblSuccess.Text = "Saved Successfully";
}
else
{
lblFailed.Text = "Failed";
}
}
but dnt know how to move on... also im getting red error line in if condition.
Priyaaammu
12-Apr-12 3:36am
View
Hi Arul...
Again im back with another doubt. Now my work is to display success message after inserting record and have to declare my connection in another function and to call that in Save event. I tried like this...
protected void btnSave_Click(object sender, EventArgs e)
{
Insert();
}
private bool Insert()
{
string strcon = "Data Source=USER-PC\\SQLEXPRESS;Initial Catalog=Course;User ID=sa;Password=sql2008";
SqlConnection mycon = new SqlConnection(strcon);
mycon.Open();
string strquery = "insert into studentDetails([name],qualification,age,mobileno) values('" + txtName.Text.ToString().Trim() + "','" + txtQual.Text.ToString().Trim() + "','" + txtAge.Text.ToString().Trim() + "','" + txtMobile.Text.Trim() + "')";
SqlCommand cmd = new SqlCommand(strquery, mycon);
if (cmd.ExecuteNonQuery() == true)
{
lblSuccess.Text = "Saved Successfully";
}
else
{
lblFailed.Text = "Failed";
}
}
but dnt know how to move on... also im getting red error line in if condition
Priyaaammu
12-Apr-12 3:00am
View
Ok...thanks for all ur comments!
Priyaaammu
12-Apr-12 2:49am
View
Ok...thanks,got it clearly
Priyaaammu
12-Apr-12 2:46am
View
Ok...i accepted,but clear me y u mean that as keyword
Priyaaammu
12-Apr-12 2:43am
View
Im not clear...why do u mean that its a keyword
Priyaaammu
12-Apr-12 2:39am
View
I tried like this...
string strquery = "INSERT INTO studentDetails([name],qualification,age,mobileno) values('" + txtName.Text.ToString().Trim() + "','" + txtQual.Text.ToString().Trim() + "','" + txtAge.Text.ToString().Trim() + "','" + txtMobile.Text.Trim() + "')";
But having doubt in this,why name given as [name]
Priyaaammu
12-Apr-12 2:29am
View
Ya...got it!
Priyaaammu
12-Apr-12 2:28am
View
Having doubt...y did u gave name in []
Priyaaammu
12-Apr-12 2:27am
View
Thanks a lot...its working fine!
Priyaaammu
12-Apr-12 2:25am
View
No...still struggling with same error!
Priyaaammu
12-Apr-12 2:25am
View
Ya..tried,but didnt
Priyaaammu
12-Apr-12 1:51am
View
protected void btnSave_Click(object sender, EventArgs e)
{
string strcon = "Data Source=USER-PC\\SQLEXPRESS;Initial Catalog=Course;User ID=sa;Password=sql2008";
SqlConnection mycon = new SqlConnection(strcon);
mycon.Open();
string strquery = "INSERT INT0 studentDetails ('" + txtName.Text.ToString() + "','" + txtQual.Text.ToString() + "','" + txtAge.Text.ToString() + "','" + txtMobile.Text + "')";
SqlCommand cmd = new SqlCommand(strquery, mycon);
cmd.ExecuteNonQuery();
}
My database fields are name-nvarchar(20),qualification-nvarchar(20),age-nvarchar(20),mobileno-varchar(10)
Priyaaammu
12-Apr-12 1:48am
View
Tried...still getting same incorrect syntax error
Priyaaammu
12-Apr-12 1:45am
View
Guide me soon...
Priyaaammu
12-Apr-12 1:39am
View
But i gave 9 digits only,why thar error came?
Priyaaammu
12-Apr-12 1:37am
View
I gave datatype as name-nvarchar(20),qualification-nvarchar(20),age-nvarchar(20),mobileno-varchar(10)...And i insert datas as "Priya,B.E,27,044256892" in my application. what's my mistake!
Priyaaammu
12-Apr-12 1:37am
View
Hi Arul...
I gave datatype as name-nvarchar(20),qualification-nvarchar(20),age-nvarchar(20),mobileno-varchar(10)...And i insert datas as "Priya,B.E,27,044256892" in my application. what's my mistake!
Priyaaammu
12-Apr-12 1:35am
View
I gave datatype as name-nvarchar(20),qualification-nvarchar(20),age-nvarchar(20),mobileno-varchar(10)...And i insert datas as "Priya,B.E,27,044256892" in my application. what's my mistake!
Priyaaammu
12-Apr-12 1:29am
View
I gave datatype as name-nvarchar(20),qualification-nvarchar(20),age-nvarchar(20),mobileno-varchar(10)...what's my mistake
Priyaaammu
12-Apr-12 1:25am
View
Its not working...actually why we are using parameters here?
Priyaaammu
12-Apr-12 1:24am
View
Oh...still getting same error:-(
Priyaaammu
12-Apr-12 1:15am
View
Ok...i changed to "insert into..." and now getting error as
"String or binary data would be truncated.
The statement has been terminated."
Priyaaammu
12-Apr-12 1:09am
View
age-nvarchar,mobileno-varchar
Priyaaammu
12-Apr-12 1:08am
View
Thanks for your comment...
I tried,but still getting same error as "Incorrect syntax near 'studentDetails" near cmd.ExecuteNonQuery
Priyaaammu
12-Apr-12 1:04am
View
Ya..."Incorrect syntax near 'studentDetails'." near cmd.ExecuteNonQuery
Priyaaammu
30-Mar-12 9:14am
View
Got solution,i missed some closing tags...but now i have another problem that im my grid view i have to show records along with delete button in same row to delete record. How to do it?
Priyaaammu
30-Mar-12 8:23am
View
i sent my full code...try to solve my problem soon
Priyaaammu
30-Mar-12 8:13am
View
<cc1:TabContainer ID="tab1" runat="server" Height="250px"
Width="81%" ActiveTabIndex="0" AutoPostBack="true">
<cc1:TabPanel ID="tpan1" runat="server" Width="100%" BorderStyle="Solid" BackColor="Bisque"
TabIndex="1">
<HeaderTemplate>
Catagory</HeaderTemplate>
<contenttemplate>
<table align="center" width="60%" border="1" cellpadding="3" cellspacing="3">
<tr class="tr_headers">
<td align="left" valign="middle" colspan="3">
<asp:Label ID="lblTitle" runat="server" Text="Catagory" >
</td>
</tr>
<tr>
<td align="right" valign="middle" style="width: 30%">
<asp:Label ID="lblCatagoryName" runat="server" Text="Catagory Name: ">
</td>
<td align="left" valign="middle" style="width: 50%">
<asp:TextBox ID="txtCatagoryName" runat="server" Height="21px" TabIndex="1" Width="241px"
MaxLength="30">
</td>
</tr>
<tr>
<td align="right" valign="middle" style="width: 30%">
<asp:Label ID="lblCatagoryDescription" runat="server" Text="Catagotry Description: ">
</td>
<td align="left" valign="middle" style="width: 50%">
<asp:TextBox ID="txtCatagoryDescription" runat="server" Height="21px" TabIndex="1"
Width="241px" MaxLength="255">
</td>
<td align="left" valign="middle" style="width: 20%">
<asp:Button ID="butAddCatagory" runat="server" Text="Add" TabIndex="2" />
</td>
</tr>
<tr>
<td align="center" valign="middle" colspan="3">
<asp:GridView ID="grdCatagory" runat="server" Width="97%" PageSize="5"
AutoGenerateColumns="False">
<columns>
<asp:BoundField DataField="categoryName" HeaderText="Catagory Name">
<itemstyle horizontalalign="Center">
<asp:BoundField DataField=""
Priyaaammu
27-Mar-12 8:01am
View
Very clear...my next doubt was about autoeventwireup=true or false.
I searched and got that if its true means we have to manually hooks events otherwise framework will raise itself,but cannot understand clearly...explain with example please
Priyaaammu
27-Mar-12 7:29am
View
thanks...got it,but which is better true or false?
Priyaaammu
27-Mar-12 6:49am
View
explain with this...
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack )
{
textbox1.Text = "Hello!";
}
}
what happen if postback =true?
Priyaaammu
27-Mar-12 6:32am
View
can't get...what is the use of it,simple example please.....
Priyaaammu
27-Mar-12 5:29am
View
what is the use of it...simple example please!
Priyaaammu
27-Mar-12 5:05am
View
Thanks a lot.....i used view state management and solved my problem. And i have one more doubt in postback. Actually why we are using postback? Every time client sends request and server sending response is a regular thing...then what is the need of postback? Guide with simple example...
Priyaaammu
27-Mar-12 2:32am
View
Im using that line to clear the first entered value in text box when "+" button is clicked because im having only one textbox to get and display values
Priyaaammu
27-Mar-12 2:29am
View
Thanks for your reply........Actually my task is to a simple calculator program. Im having only one text box to get values and to display result. When searched for related programs,i got the code for windows application so i tried that for my web application...
When debug on above code,i got first value in total1...but in equal event,total1 value will be zero only. I didnt get what is my fault,guide me.......
Show More