15,888,803 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 ClimerChinna (Top 143 by date)
ClimerChinna
19-Mar-15 1:44am
View
is there Taluka table in your database
ClimerChinna
19-Mar-15 1:43am
View
Deleted
ujh
ClimerChinna
31-Oct-14 2:38am
View
I have posted my code, check the question again.
ClimerChinna
31-Oct-14 1:38am
View
could you please post your code so that i can compare it with my code,
my chrome version is-38.0.2125.111 m
my page is content page no master page is there for it
I have some problems in sharing the code
Yes, I have tried scriptmanager also but its not working
ClimerChinna
31-Oct-14 0:16am
View
End user may not do the same right? As a Developer we need to think of end user point of view.
ClimerChinna
31-Oct-14 0:15am
View
thanks for the answer,
but it was not working same error repeated.
textbox1.text.focus is not working I have tried textbox1.focus()
ClimerChinna
29-Sep-14 4:36am
View
or else
check below syntax in your web.config
<system.web>
<pages>
<controls>
<add tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI">
ClimerChinna
29-Sep-14 4:35am
View
add the above code to add tagprefix in .aspx page of your page and try again
ClimerChinna
29-Sep-14 0:22am
View
could you post your code so that I can check where it was going wrong
ClimerChinna
8-Sep-14 2:29am
View
yes sinisa is right
ClimerChinna
8-Sep-14 0:48am
View
post gridview code completly its not completed here
ClimerChinna
8-Sep-14 0:33am
View
post your code so that we can try to resolve the problem
ClimerChinna
4-Sep-14 6:17am
View
you are asking about close button but you are not posting code upto that element
ClimerChinna
4-Sep-14 6:16am
View
y its not working for you, its working fine here,, you just post complete aspx code,not in the comment edit the question and place there and tel me then i'll check
ClimerChinna
4-Sep-14 6:06am
View
where did you added the button code in your page in body part?
ClimerChinna
4-Sep-14 5:59am
View
s
ClimerChinna
4-Sep-14 5:59am
View
use below button it will work
<asp:ImageButton ID="ImgExit" runat="server" ImageAlign="AbsBottom" ImageUrl="~/Images/Menu_Images/Exit.png" AlternateText="Exit" OnClientClick="window.close()" />
ClimerChinna
4-Sep-14 5:54am
View
why did you use <link href="javascript:window.close()">Close Window />
it wont work rather use below code in body part
Close Window
ClimerChinna
4-Sep-14 5:51am
View
ok i got it
ClimerChinna
4-Sep-14 5:48am
View
where is exit button
ClimerChinna
4-Sep-14 5:48am
View
where is exit button code
ClimerChinna
4-Sep-14 5:46am
View
send me i'll try
ClimerChinna
4-Sep-14 5:31am
View
its working fine here
ClimerChinna
4-Sep-14 4:38am
View
The code which you have tried is correct as per logic, but your code is having small syntax errors like { missing, etc...
ClimerChinna
4-Sep-14 0:12am
View
change your button click event like below
private void button1_Click(object sender, EventArgs e)
{
BirthdayParty partyOn = new BirthdayParty();
MessageBox.Show( partyOn.getMessage("Shadid")+"\n"+partyOn.getPresents(8)+"\n"+partyOn.getParty( true));
}
ClimerChinna
3-Sep-14 9:24am
View
have you tried solution1
ClimerChinna
3-Sep-14 8:52am
View
Post the code which you have tried so that we can try to find what's the problem is
ClimerChinna
3-Sep-14 8:16am
View
check the above code in solution3 try with that and tel me whether it worked or not
ClimerChinna
3-Sep-14 0:32am
View
i could not understand your problem, sum of digits from 2 textboxes means
1) you want to add the numbers then calculate sum of digits
2) You want to concatenate both numbers then calculate sum of digits
tell me what you wanted to do
ClimerChinna
2-Sep-14 6:27am
View
me tooo...
ClimerChinna
2-Sep-14 6:20am
View
yeah i know... but it was of very useful
ClimerChinna
2-Sep-14 5:09am
View
welcome , happy coding
ClimerChinna
2-Sep-14 2:51am
View
send me those tables details and tel us which details you want to display
ClimerChinna
2-Sep-14 1:38am
View
no i must display it on a label only,iam not allowed to display using javascript
ClimerChinna
2-Sep-14 1:36am
View
in that case, when i display the success message on label it wont be displayed when i use response.redirect
ClimerChinna
27-Aug-14 9:23am
View
which error
ClimerChinna
27-Aug-14 8:58am
View
this method must like this why did you changed, use as it is man
private string radPopupCloseScript(string ActionName)
{
String script = @"var oArg = new Object();
oArg.actionName = '" + ActionName + @"';
var oWnd = GetRadWindow();
oWnd.close(oArg);";
return script;
}
ClimerChinna
27-Aug-14 8:53am
View
no need of script tag as we are using script manager
ClimerChinna
27-Aug-14 8:49am
View
this method must like this why did you changed, use as it is man
private string radPopupCloseScript(string ActionName)
{
String script = @"var oArg = new Object();
oArg.actionName = '" + ActionName + @"';
var oWnd = GetRadWindow();
oWnd.close(oArg);";
return script;
}
ClimerChinna
27-Aug-14 8:45am
View
send me aspx page code also
ClimerChinna
27-Aug-14 8:41am
View
use scriptmanager not radscript manager
protected void IssueCancel_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "closed", radPopupCloseScript("closed"), true);
}
ClimerChinna
27-Aug-14 8:33am
View
i have asked to post the modified code not previous code again
ClimerChinna
27-Aug-14 8:19am
View
could you post your code once again so that i can correct it
ClimerChinna
27-Aug-14 8:18am
View
below is select query
Sqlstr = "select sum(sal_bonus) as bonusamt from salary_master where sal_deleted = 0 "+
" and year(sal_bonusdate) = " + lngPreviousYear + " and comp_id = " + strCompanyid +
" and emp_code = '" + Txt_Employee.Text+ "' and sal_type = '" + vpcn.cSalary_2Half + "' ";
ClimerChinna
27-Aug-14 8:17am
View
the below is stored procedure for your code you need to pass parameters to it.
CREATE Procedure GetBonus
@lngPreviousyear int,
@CompanyId int,
@empCode varchar(50),
@SalType varchar(50),
@Bonussal money output
AS
BEGIN
select @Bonussal=sum(sal_bonus) from salary_master where sal_deleted=0 and year(sal_bonusdate)=@lngPreviousyear
and comp_id=@CompanyId and emp_code=@empCode and sal_type=@SalType
END
ClimerChinna
27-Aug-14 8:12am
View
have you added the code as it is, its working here try to trace the code as it is
ClimerChinna
27-Aug-14 8:09am
View
what is vpcn, is it a table, if so what are the fields in vpcn table and alary_master table send them so that i can write the query
ClimerChinna
27-Aug-14 8:05am
View
do one thing copy your code with below code as it is it will work, accept solution if it works
public string UpdateUserID(string updateID)
{
UpdatedBy = System.Web.HttpContext.Current.Request.LogonUserIdentity.Name.Substring(12);
string sql = "select * from Cwipuser.CWIP_Variances ";
SqlCommand cmd = new SqlCommand(sql, MyCon);
MyCon.Open();
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
if (!rdr.IsDBNull(1))
{
updateID = rdr.GetString(1);
}
updateID = UpdatedBy;
}
MyCon.Close();
return updateID;
}
ClimerChinna
27-Aug-14 8:02am
View
ofcourse this data is available in your database but the output of your select query is returning only updateid so only one index will be there
ClimerChinna
27-Aug-14 7:52am
View
then you need to give index number 0 only
you just use below code in the place of your while loop code,you will get the result
while (rdr.Read())
{
if (!rdr.IsDBNull(0))
{
updateID = rdr.GetString(0);
}
updateID = UpdatedBy;
}
ClimerChinna
27-Aug-14 7:36am
View
but in your select query you are returning only update_Userid right? then how will you get ID
ClimerChinna
27-Aug-14 7:30am
View
you are giving the fields from your code with out explaining about them for us,how could we know what is what , and how could we wrtie query for you with out knowing any of your fields,, try to ask question clearly
ClimerChinna
27-Aug-14 7:29am
View
you need query or procedure
ClimerChinna
27-Aug-14 7:27am
View
what is id and updateid here you are returning only updateuserid from the select query right then how will you get id
ClimerChinna
27-Aug-14 7:19am
View
i think the result is having only one value, check it by debugging
ClimerChinna
27-Aug-14 7:01am
View
welcome
ClimerChinna
27-Aug-14 6:37am
View
heyyy,i have changed solution1 again,check it
ClimerChinna
27-Aug-14 6:34am
View
heyyy,i have changed solution1 again,please check it
ClimerChinna
27-Aug-14 6:15am
View
check solution1
ClimerChinna
27-Aug-14 6:12am
View
look at solution1
ClimerChinna
27-Aug-14 6:05am
View
r u having any data in tbluser table
ClimerChinna
27-Aug-14 3:25am
View
Remove Validation group for both validator and button
like below
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="ename,ename1 must match"
OnServerValidate="CustomValidator1_ServerValidate" ValidateEmptyText="true">
<asp:Button ID="btnsubmit" runat="server" Text="Submit"/>
check it now
ClimerChinna
27-Aug-14 2:22am
View
welcome, happy coding
ClimerChinna
27-Aug-14 0:21am
View
did you get what you required or not??
ClimerChinna
26-Aug-14 9:31am
View
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
CustomValidator cv = (CustomValidator)source;
GridViewRow gvr = (GridViewRow)cv.NamingContainer;
CheckBox chk = (CheckBox)gvr.FindControl("CheckBox1");
TextBox txt1 = (TextBox)gvr.FindControl("TextBox1");
TextBox txt2 = (TextBox)gvr.FindControl("TextBox6");
string serials = txt2.Text;
string[] sl = serials.Split(',');
if (chk.Checked == true)
{
if (sl.Length == Convert.ToInt16(txt1.Text))
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
else
args.isvalid=false;
}
check with below code
ClimerChinna
26-Aug-14 9:30am
View
what output did you get
ClimerChinna
26-Aug-14 9:24am
View
check solution2
ClimerChinna
26-Aug-14 9:21am
View
post your code which you have tried, so that we can help you
ClimerChinna
26-Aug-14 8:54am
View
look at solution2
ClimerChinna
25-Aug-14 6:36am
View
Thanks a lot,but i want to know how to save this file in required path
ClimerChinna
25-Aug-14 5:34am
View
hi have you got the answer
ClimerChinna
22-Aug-14 6:08am
View
could you tell me onething json format means how do you want your output whether on xml file or on a control or anything else
ClimerChinna
22-Aug-14 5:49am
View
thats not a problem, as a fresher these confusions will be common, try to ask your question clearly so that you can find answer more quickly,in the start itself if u have ask me about json format may be i try to get that only
ClimerChinna
22-Aug-14 5:43am
View
displaying o/p in json format ,i too dont have idea,i need check that then i wil tel u
ClimerChinna
22-Aug-14 5:20am
View
tell me onething whether you got alert message or not on button click
ClimerChinna
22-Aug-14 5:17am
View
for username problem change webservice to below method
[WebMethod]
public string Inserttblval(int CountryId, string UserName, int IsActive)
{
int rowsInserted;
SqlConnection conn = new SqlConnection(your connectionstring);
string sql = string.Format(@"INSERT INTO [TestDB].[dbo].[Table_1] ([CountryId],[UserName],[IsActive]) VALUES ({0},'{1}',{2})", CountryId,UserName, IsActive);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
rowsInserted = cmd.ExecuteNonQuery();
conn.Close();
cmd = null;
return string.Format("Thank you, {0} number of rows inserted!", rowsInserted);
}
ClimerChinna
22-Aug-14 5:16am
View
what, r u getting alert message showing number of records inserted or not
ClimerChinna
22-Aug-14 5:12am
View
can you tell me what's the error you are geting now clearly
ClimerChinna
22-Aug-14 5:10am
View
here one thing you need to understand is for integers no need of (''),but for string you need to use single quotes,thats the error for username not accepting string,ok try to look at the above method you can understand easily....
ClimerChinna
22-Aug-14 5:09am
View
for username problem change webservice to below method
[WebMethod]
public string Inserttblval(int CountryId, string UserName, int IsActive)
{
int rowsInserted;
SqlConnection conn = new SqlConnection(your connectionstring);
string sql = string.Format(@"INSERT INTO [TestDB].[dbo].[Table_1] ([CountryId],[UserName],[IsActive]) VALUES ({0},'{1}',{2})", CountryId,UserName, IsActive);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
rowsInserted = cmd.ExecuteNonQuery();
conn.Close();
cmd = null;
return string.Format("Thank you, {0} number of rows inserted!", rowsInserted);
}
ClimerChinna
22-Aug-14 5:06am
View
sorry for late reply,I have Left for lunch
ClimerChinna
22-Aug-14 5:04am
View
no need of button code it will execute, we have written it in javascript function
ClimerChinna
22-Aug-14 1:00am
View
have u added aspx code also same like above
ClimerChinna
22-Aug-14 0:57am
View
check solution once again i have modified it
ClimerChinna
22-Aug-14 0:56am
View
remove <pre>
ClimerChinna
22-Aug-14 0:45am
View
look at solution3 and follow as it is dont change any thing
ClimerChinna
22-Aug-14 0:39am
View
ok i will send you complete code step by step just follow that
ClimerChinna
22-Aug-14 0:35am
View
in which line you are getting error input string not in correct format error
ClimerChinna
22-Aug-14 0:19am
View
send me the method which you have written in webservice so that i can check ,what could I do with the error
ClimerChinna
21-Aug-14 9:26am
View
use the method name which you have created in webservice in place of InsertWebService
try to solve small errors
ClimerChinna
21-Aug-14 9:21am
View
use below line
return ws.InsertWebservice(countryid,username,isactive)
ClimerChinna
21-Aug-14 8:21am
View
add this webmethod to cs page
using System.Web.Services;
[WebMethod]
public static string GetValues(int countryid,string username,int isactive)
{
WebService ws = new WebService();
return ws.inserttblval(username, countryid, isactive);
}
add below Javascript method to aspx page in head part:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function () {
$("[id*=btnSubmit]").click(function () {
var obj = {};
obj.countryid = $.trim($("[id*=TextBox2]").val());
obj.username= $.trim($("[id*=TextBox1]").val());
obj.isactive= $.trim($("[id*=TextBox3]").val());
$.ajax({
type: "POST",
url: "execnonqueryex.aspx/GetValues",
data: JSON.stringify(obj),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
alert(r.d);
document.getElementById('lblmsg').value = r.d;
}
});
return false;
});
});
</script>
ClimerChinna
21-Aug-14 7:22am
View
all buttons are having same id??
ClimerChinna
21-Aug-14 6:47am
View
why it was not working for you its working fine here
i have used below code in rowdatabound event check that once
if (e.Row.DataItem != null)
{
Button btnsubmit = (Button)e.Row.FindControl("btnsubmit");
btnsubmit.Attributes.Add("onclick", "return gviewValidate(" + e.Row.RowIndex.ToString() + ")");
}
ClimerChinna
21-Aug-14 6:42am
View
from which event you are adding this event to the button
ClimerChinna
21-Aug-14 6:09am
View
all the three at a time as a string means,its not possible
ClimerChinna
21-Aug-14 5:44am
View
with out knowing how to write json method why are you trying to use json.
ClimerChinna
21-Aug-14 5:40am
View
where is your json funtion from where you are getting these values UserName,CountryId,IsActive
ClimerChinna
21-Aug-14 4:38am
View
replave your button click event with below code
protected void Button1_Click(object sender, EventArgs e)
{
WebService ws = new WebService();
Label1.Text = ws.Inserttblval(int.Parse(TextBox1.Text),TextBox2.Text,int.Parse(TextBox3.Text));
}
ClimerChinna
21-Aug-14 3:32am
View
post complete code of your page
ClimerChinna
21-Aug-14 3:31am
View
lblmsg.Text=ws.Insertempdet(countryId, username, isactive);
have you given the values for username,countryid,isactive
ClimerChinna
21-Aug-14 3:29am
View
this is not the function where we have worked up to now right, check remaining code in your page
ClimerChinna
21-Aug-14 1:02am
View
have you got the solution???
ClimerChinna
21-Aug-14 0:57am
View
first you need to create webmethod in webservice like below
[WebMethod]
public string Insertempdet(int CountryId, string UserName, int IsActive)
{
int rowsInserted;
SqlConnection conn = new SqlConnection(your connectionstring);
string sql = string.Format(@"INSERT INTO [TestDB].[dbo].[Table_1] ([UserName],[CountryId],[IsActive]) VALUES ({0},'{1}',{2})", UserName, CountryId, IsActive);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
rowsInserted = cmd.ExecuteNonQuery();
conn.Close();
cmd = null;
return string.Format("Thank you, {0} number of rows inserted!", rowsInserted);
}
create an object for webservice in your page CS Code
WebService ws = new WebService();
then call the webmethod in respective event like below return value i was displaying in label
lblmsg.Text=ws.Insertempdet(countryId, username, isactive);
ClimerChinna
21-Aug-14 0:56am
View
first you need to create webmethod in webservice like below
[WebMethod]
public string Insertempdet(int CountryId, string UserName, int IsActive)
{
int rowsInserted;
SqlConnection conn = new SqlConnection(your connectionstring);
string sql = string.Format(@"INSERT INTO [TestDB].[dbo].[Table_1] ([UserName],[CountryId],[IsActive]) VALUES ({0},'{1}',{2})", UserName, CountryId, IsActive);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
conn.Open();
rowsInserted = cmd.ExecuteNonQuery();
conn.Close();
cmd = null;
return string.Format("Thank you, {0} number of rows inserted!", rowsInserted);
}
create an object for webservice in your page CS Code
WebService ws = new WebService();
then call the webmethod in respective event like below return value i was displaying in label
lblmsg.Text=ws.Insertempdet(countryId, username, isactive);
ClimerChinna
21-Aug-14 0:52am
View
post complete code of your page so that i can know whats the problem, i dont know why you are getting this error i have executed it but didn't get any error
ClimerChinna
21-Aug-14 0:48am
View
have you selected start page for your website???
ClimerChinna
21-Aug-14 0:47am
View
could you post code where you are calling above method
ClimerChinna
21-Aug-14 0:39am
View
look at solution2
ClimerChinna
21-Aug-14 0:37am
View
if isactive is int why did you give string in function parameters
there also you need to use int
ClimerChinna
21-Aug-14 0:29am
View
string sql = string.Format(@"INSERT INTO [TestDB].[dbo].[Table_1] ([UserName],[CountryId],[IsActive]) VALUES ({0},'{1}','{2}')", UserName, CountryId, IsActive);
use above statement it may help you
ClimerChinna
18-Aug-14 23:50pm
View
Then use like below
strQuery += " proj_name = 'not completed' and unit_description ='not completed' AND company_code ='not completed' AND status='not completed' ORDER BY Contract_num DESC";
ClimerChinna
18-Aug-14 8:02am
View
what, have you executed it
if you got the answer then accept solution
ClimerChinna
18-Aug-14 7:59am
View
could you post your code so that i can know what is the error is
ClimerChinna
18-Aug-14 7:47am
View
check solution 3
ClimerChinna
18-Aug-14 2:38am
View
strQuery += " proj_name and unit_description AND company_code AND status='not completed' ORDER BY Contract_num DESC";
what is the purpose of above line
ClimerChinna
14-Aug-14 5:32am
View
CS Code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
getdata();
}
}
public void getdata()
{
SqlConnection con = new SqlConnection(your ConnectionString);
SqlDataAdapter da = new SqlDataAdapter("select * from tablename", con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
getdata();
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
TextBox t1, t2;
t1 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtName");
t2 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtAge");
RadioButtonList rdb;
rdb = (RadioButtonList)GridView1.Rows[e.RowIndex].FindControl("RadioButtonList1");
SqlConnection con = new SqlConnection(your ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("Update tablename SET Name='" + t1.Text + "',Age=" + t2.Text + ",[Yes/No]=" + rdb.SelectedValue + " where Id=" + GridView1.DataKeys[e.RowIndex].Value + "", con);
cmd.ExecuteNonQuery();
con.Close();
GridView1.EditIndex = -1;
getdata();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
DataRowView drview = e.Row.DataItem as DataRowView;
if (e.Row.RowState == DataControlRowState.Edit)
{
RadioButtonList rdb;
rdb = (RadioButtonList)e.Row.FindControl("RadioButtonList1");
int yesno = int.Parse(drview[2].ToString());
if (yesno == 1)
rdb.SelectedIndex = 0;
else
rdb.SelectedIndex = 1;
}
}
ClimerChinna
14-Aug-14 5:26am
View
aspx code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" DataKeyNames="id"
OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" OnRowDataBound="GridView1_RowDataBound">
<columns>
<asp:TemplateField HeaderText="Name">
<itemtemplate>
<%# Eval("Name") %>
<edititemtemplate>
<asp:TextBox ID="txtName" runat="server" Text='<%#Eval("Name") %>'>
<asp:TemplateField HeaderText="Age">
<itemtemplate>
<%# Eval("Age")%>
<edititemtemplate>
<asp:TextBox ID="txtAge" runat="server" Text='<%# Eval("Age") %>'>
<asp:TemplateField HeaderText="yes/No">
<itemtemplate>
<%# (Eval("Yes/No").ToString()) == "1" ? "Yes" : "No" %>
<edititemtemplate>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Selected="False" Value="1">Yes
<asp:ListItem Selected="False" Value="0">No
<asp:CommandField ShowEditButton="true" />
<%--<asp:BoundField HeaderText="Name" DataField="Name" />
</columns> >
ClimerChinna
14-Aug-14 0:58am
View
can you post your code for editing so that i can change them accordingly..
ClimerChinna
14-Aug-14 0:25am
View
I couldn't understand your problem,could you explain it more clearly...
ClimerChinna
8-Aug-14 5:04am
View
Welcome....happy coding
ClimerChinna
8-Aug-14 1:45am
View
add below function to your CS file
protected void AdRotator1_AdCreated(object sender, AdCreatedEventArgs e)
{
}
ClimerChinna
8-Aug-14 0:23am
View
could you send me selectedindex changed event code
ClimerChinna
7-Aug-14 2:12am
View
if ContractNo is integer then
amicassaCon_repgen.Open();
SqlCommand get_no = new SqlCommand("DECLARE @GetNo int IF EXISTS(SELECT ContractNo FROM MC.tblContracts WHERE ContractNo="+company_code.SelectedValue+" and ContractPrjunitdesc='"+unit_desc.Text+"') BEGIN SET @GetNo=0 END ELSE BEGIN SET @GetNo=1 END SELECT @GetNo", amicassaCon_repgen);
SqlDataReader drno = get_no.ExecuteReader();
if (drno.Read())
{
if(drno[0].toString()!="0") \\contract not exists
{
//my codes for inserting data and displaying to the grid view
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Error: Already had a Contract!');", true);
}
}
drno.Close();
ClimerChinna
7-Aug-14 2:11am
View
no actually GetNo is a binary value representing 0 or 1
"0" means Contract exists
"1" means Doesn't Exist
if ContractNo is varchar value then change below code
amicassaCon_repgen.Open();
SqlCommand get_no = new SqlCommand("DECLARE @GetNo int IF EXISTS(SELECT ContractNo FROM MC.tblContracts WHERE ContractNo='"+company_code.SelectedValue+"' and ContractPrjunitdesc='"+unit_desc.Text+"') BEGIN SET @GetNo=0 END ELSE BEGIN SET @GetNo=1 END SELECT @GetNo", amicassaCon_repgen);
SqlDataReader drno = get_no.ExecuteReader();
if (drno.Read())
{
if(drno[0].toString()!="0") \\contract not exists
{
//my codes for inserting data and displaying to the grid view
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Error: Already had a Contract!');", true);
}
}
drno.Close();
ClimerChinna
6-Aug-14 3:06am
View
tell me whether ContractNo is integer or varchar value
ClimerChinna
6-Aug-14 1:28am
View
use below code
amicassaCon_repgen.Open();
SqlCommand get_no = new SqlCommand("DECLARE @GetNo int IF EXISTS(SELECT ContractNo FROM MC.tblContracts WHERE ContractNo="+company_code.SelectedValue+' and ContractPrjunitdesc='"+unit_desc.Text+"') BEGIN SET @GetNo=0 END ELSE BEGIN SET @GetNo=1 END SELECT @GetNo", amicassaCon_repgen);
SqlDataReader drno = get_no.ExecuteReader();
if (drno.Read())
{
if(drno[0].toString()!="0") \\contract not exists
{
//my codes for inserting data and displaying to the grid view
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Error: Already had a Contract!');", true);
}
}
drno.Close();
ClimerChinna
6-Aug-14 1:13am
View
Deleted
Use causeDetail.ToolTip.toString()
ClimerChinna
6-Aug-14 0:52am
View
Deleted
solution
ClimerChinna
6-Aug-14 0:51am
View
Deleted
solution
ClimerChinna
6-Aug-14 0:33am
View
copy above code as it is and use it in new webpage and try, please tell me if there are any errors, i have used above code in my project for popup window its working fine.
ClimerChinna
6-Aug-14 0:29am
View
previous post is modified code of the question
current post is the code which i have executed in my project
thats why I have posted both of the answers.
ClimerChinna
6-Aug-14 0:20am
View
then use below statement.
if(drno[0].toString()!="0")
sorry its not @DeptNo it is @GetNo
ClimerChinna
5-Aug-14 9:29am
View
could you send me complete page of your page so that i can find out whats the error is
ClimerChinna
5-Aug-14 9:21am
View
still there are errors?
ClimerChinna
5-Aug-14 9:17am
View
have you tried solution 3
ClimerChinna
5-Aug-14 3:00am
View
could you please tell me the same thing for RAD list view also
ClimerChinna
5-Aug-14 2:51am
View
Sorry ,
its working fine now I have placed the code in wrong place that's why it didn't worked.
I am So sorry its my fault only.
ClimerChinna
5-Aug-14 2:46am
View
Deleted
Sorry ,
its working fine now I have placed the code in wrong place that's why it didn't worked.
I am So sorry its my fault only.
ClimerChinna
5-Aug-14 2:00am
View
Thanks for reply,
but its not working
ClimerChinna
5-Aug-14 1:59am
View
Deleted
Thanks for reply,
but its not working
ClimerChinna
5-Aug-14 1:23am
View
ok Thankyou, i will work on it
ClimerChinna
5-Aug-14 1:19am
View
Hi,
Thanks for your reply, i need to display a grid in the popup window is it possible with jquery.
Show More