15,911,789 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 Chinmaya C (Top 71 by date)
Chinmaya C
9-Jul-13 0:08am
View
You can use javascript to raise server call back event...
or else add button to the grid cell instead of label... and set css style of the button so that it will look like label.
Chinmaya C
2-Jul-13 2:01am
View
You can reach me at me.chinmaya@gmail.com or me.chinmaya@hotmail.com
Chinmaya C
6-May-13 5:16am
View
Hi Bikash,
Could you please explain us with an example.
Thanks
Chinmaya C
29-Apr-13 3:19am
View
Could you please post your code, so that it will be easier for us to understand.
Chinmaya C
29-Apr-13 3:15am
View
Try implementing paging (read certain number of records) in sql server stored procedure. And try loading data from that procedure.
Hope the following link will help you:
http://www.mssqltips.com/sqlservertip/1699/sql-server-stored-procedures-to-page-large-tables-or-queries/
Chinmaya C
29-Apr-13 3:12am
View
It should not behave like that. Can you please try after removing CauasesValidation attribute from button tag.
Chinmaya C
29-Apr-13 3:09am
View
Have you tried with the following statement for ItemTemplate of Repeater control:
<asp:Image ID="Image1" ImageUrl='<%#Container.DataItem("Column_Name")%>' runat="server" />
Replace Column_Name with your database column name which contains the url to image.
Chinmaya C
29-Apr-13 3:01am
View
Welcome. :)
Chinmaya C
26-Apr-13 4:42am
View
Are you facing any other problem??
Chinmaya C
26-Apr-13 0:28am
View
I think you need to modify the below statement
<input type="submit" önclick="xyZ(),abC(),deF(),open_win()">
to
<input type="button" önclick="return open_win();"/>
and in open_win() :
function open_win() {
if(xyZ() && abC() && deF())
window.open("hello.html","_blank","width=400");
else
alert("Register Again");
}
and modify all other function to:
function xyZ(){
if(...) // your validation goes here
{
return true;
}
else
{
return false;
}
}
similarly modify all other functions as above.
hope this will help. :)
Chinmaya C
25-Apr-13 12:09pm
View
Don't know why you are invoking xyZ(), abC(), deF() twice. one by onClick event and the other time you are invoking in open_win().
And one more thing are you sure you are returning true/false based on the success or unsuccessful execution of these functions?
Chinmaya C
25-Apr-13 2:30am
View
Most welcome dear. Happy to help. :)
Chinmaya C
24-Apr-13 9:30am
View
okay no problem. you can send me at me.chinmaya@gmail.com.
Chinmaya C
24-Apr-13 8:37am
View
try commenting all the other javascript functions other than popup, then try..
Chinmaya C
24-Apr-13 8:34am
View
Can you do one more thing.. Create a blank crystal report with the same datasource. but don't add any field into the report. and try loading that report. and let us know the result.
Chinmaya C
24-Apr-13 8:32am
View
I believe you can't directly access the control of a page which is in iFrame.
Chinmaya C
24-Apr-13 8:26am
View
But in firebug i have checked the address value is maintaining till the postback.
I have tested this after having breakpoint in __doPostBack method. I think there are some server codes which is resetting the values.
The code which you have posted, is the complete server code for the page?? or are there something else?
Chinmaya C
24-Apr-13 8:18am
View
is the same happening for all of the textboxes???
Chinmaya C
24-Apr-13 8:12am
View
Are you sure the problem is with Crystal Report.
Try commenting the following code and run the page. if the same error is coming the then problem is with something other.
CrystalReportViewer1.ReportSource = rd;
Chinmaya C
24-Apr-13 8:03am
View
Please verify ViewState is enabled.
Chinmaya C
22-Apr-13 12:18pm
View
do you have any constructors for Loads, Stops, and CareerObj classes?
and why don't you use DataReader instead of datatable. I believe datareader is faster than dataset.
Chinmaya C
22-Apr-13 1:11am
View
Could you please post some more description about the problem so that it will help us to answer.
Chinmaya C
22-Apr-13 1:07am
View
Where you have written the above code. Can you please post the eventsource of the mentioned code.
Chinmaya C
11-Apr-13 11:22am
View
Please mark this question as solved so that it will be shown as solved and help others. :)
Chinmaya C
11-Apr-13 6:42am
View
basically .append() add the elements to the last and .prepend() add the element as the first element.
Chinmaya C
11-Apr-13 6:28am
View
instead of .append(), why don't you use prepend() method.
Chinmaya C
9-Apr-13 10:32am
View
Could you please post the exception for better understanding...
Chinmaya C
9-Apr-13 6:38am
View
Have you tried with $(document).ready() ?
Chinmaya C
9-Apr-13 4:25am
View
You have specified ValidationGroup="Name1". So please check if any client validation fails.
Chinmaya C
9-Apr-13 4:22am
View
i think your update statement should be:
UPDATE Admin_Branch set BranchName=@BranchName where BranchCode=@original_BranchCode
Chinmaya C
5-Apr-13 5:01am
View
Are you looking for a perticular control?
if so then the following code may help:
GridView1.HeaderRow.FindControl("[ControlName]") as [ControlType]
Chinmaya C
5-Apr-13 4:56am
View
Yes you can update using Jquery, which is complex to implement but a recommendable solution.
But also you can put that label inside update panel and have a timer control to refresh the label in a certain interval.
Chinmaya C
5-Apr-13 4:53am
View
The fields which you don't want to modify, you can set ReadOnly property to True for that column. And regarding dropdown controls in some places you needs to add a templatefield instead of bound fields.
Example :
<asp:TemplateField ShowHeader="False">
<edititemtemplate>
<asp:DropDownList ID="drpItems" runat="server">
<asp:ListItem Text="Item1">
<asp:ListItem Text="Item2">
<asp:ListItem Text="Item3">
<itemtemplate>
<asp:Label ID="lblItem" runat="server" Text='<%# Eval("_modifyIp") %>'>
Please refer the below link to get more details
http://www.asp.net/web-forms/tutorials/data-access/custom-formatting/using-templatefields-in-the-gridview-control-cs
Chinmaya C
5-Apr-13 4:30am
View
:)e.NewValues is a collection.
So if the fields are the part of GridView then the entries will be there in the collection and you need to update the values.
And if the fields are not part of GridView then you need to add those values to the collection.
So the code will be as below:
e.NewValues.Add("_modifyTime", DateTime.Now.ToString());
e.NewValues.Add("_modifyIp", Request.UserHostAddress);
Hope this helps. :)
Chinmaya C
5-Apr-13 4:24am
View
my pleasure... :)
Chinmaya C
5-Apr-13 4:20am
View
If this is the requirement then while populating the datasource for gridview you can store the IP address...
or you can try with the following code :
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
e.NewValues["_modifyTime"] = DateTime.Now.ToString();
e.NewValues["_modifyIp"] = Request.UserHostAddress;
}
Chinmaya C
5-Apr-13 4:14am
View
Are these values part of GridView???
Chinmaya C
5-Apr-13 4:13am
View
I have posted the solution in answer section and you can mark that as answered. :)
Chinmaya C
5-Apr-13 4:07am
View
I think you can directly use the Javascript functions written in the Child Page in the Master Page.
Note: if the child page doesn't contains the methods, which are intended to be invoked in master page, then invoking those method will throw exceptions.
Chinmaya C
5-Apr-13 4:05am
View
As per my understanding, you need to create DataSource dynamically based on your requirement and bind that to the grid.
Chinmaya C
5-Apr-13 4:00am
View
If the above solution helps then please mark the question as answered to help others.. :)
Chinmaya C
5-Apr-13 3:53am
View
Hi,
If the DatakeyName is _id then why are you writing such a long condition while updating or deleting.
Where is the mapping of original_column* and the actual values?
Please try with the following code for Update
UPDATE [tbl_video]
SET [_videoName] = @_videoName,
[_videoUrl] = @_videoUrl,
[_category] = @_category,
[_subCategory] = @_subCategory,
[_createdBy] = @_createdBy,
[_createdIp] = @_createdIp,
[_createTime] = @_createTime,
[_modifyIp] = @_modifyIp,
[_modifyTime] = @_modifyTime
WHERE [_id] = @original__id
Chinmaya C
5-Apr-13 3:45am
View
Could you please check your event log and check for exact error?
From the above description one can't know the type of error and its cause.
Chinmaya C
30-Mar-13 13:39pm
View
Is the combobox inside the datagridview?
Chinmaya C
30-Mar-13 13:36pm
View
Hi Ashvin,
how a class can be declared as :
public void class X
is it valid to write void while declaring a class ?
the above program looks incorrect to me. Compile time error.
Chinmaya C
30-Mar-13 13:30pm
View
Hi, Do you mean to refresh the page?
Please share the code for better understanding. :)
Chinmaya C
20-Mar-13 14:07pm
View
Try with the following code:
write the following page design:
<head runat="server">
<title></title>
<script type="text/javascript" language="javascript">
var remain;
function countDown() {
displayTimer(remain);
remain = remain - 1;
if (remain == 0) {
window.location = "result.aspx";
}
else {
document.getElementById("hdnTimeRemained").value = remain;
setTimeout("countDown()", 1000);
}
}
function readCounter() {
remain = document.getElementById("hdnTimeRemained").value;
countDown();
}
function displayTimer(secs) {
var hr = Math.floor(secs / 3600);
secs = secs % 3600;
var min = Math.floor(secs / 60);
var sec = secs % 60;
document.getElementById("lblTime").innerHTML = hr + ":" + min + ":" + sec;
}
</script>
</head>
<body önload="readCounter();">
<form id="form1" runat="server">
<div id="lblTime">
</div>
<asp:HiddenField ID="hdnTimeRemained" runat="server" />
<div>
<asp:Button ID="btnNext" runat="server" Text="Next" />
</div>
</form>
</body>
</html>
In the code behind's page_load event write the following:
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
hdnTimeRemained.Value = "3600";
}
hope this will help... :)
Chinmaya C
20-Mar-13 5:42am
View
A quick question:
Where have you kept the backup file which you are trying to restore?
Chinmaya C
20-Mar-13 5:40am
View
Hi Veena,
Could you please post the error message please??
Chinmaya C
20-Mar-13 5:07am
View
Could you please elaborate your question ?
Question is not so clear...
Chinmaya C
19-Mar-13 2:20am
View
Please check your connection string. It seems there is some problem with the connectionstring.
Chinmaya C
19-Mar-13 1:12am
View
Hi Prafulla,
Could you please provide the code for onClick event, so it will be easier to understand to cause.
and while replying please reply to the comment, so that we will get notification. :)
Chinmaya C
19-Mar-13 1:06am
View
instead of
AttachDbFilename=..\App_Data\Astronomy.mdf;
try with
AttachDbFilename=App_Data\Astronomy.mdf;
Chinmaya C
18-Mar-13 13:29pm
View
yes.. you can store settings in appsetting section of App.config (incase of windows application) or web.config (incase of web application).
and you can access that using the following:
string path = System.Configuration.ConfigurationManager.AppSettings["<settingname>"];
thanks,
chinmaya
Chinmaya C
18-Mar-13 6:37am
View
Hi Prafulla,
Just a quick question. Do you have any "Select" button in the grid?
Thanks,
Chinmaya
Chinmaya C
18-Mar-13 6:33am
View
yes.. I am also having same view as Nitin. :)
Need to check whether "Chkbox" control exists in the panel or not.
Chinmaya C
17-Mar-13 11:43am
View
Add a new column to datasource called RowNum which will have row number.
and change your code as follows:
<div id='prm-hp_n<%# Eval("RowNum") %>s' class="slide" style="display:none;">
hope this helps.
Chinmaya C
16-Mar-13 14:00pm
View
DropDownList[] arr = { ddlvnameri1, ddlvnameri2 };
for (int i = 0; i < arr.Length;i++ ) {
arr[i].DataSource = dt;
arr[i].DataTextField = "vehicle_name";
arr[i].DataValueField = "vehicle_id";
arr[i].DataBind();
}
Chinmaya C
16-Mar-13 13:53pm
View
which problem you are talking about??
Chinmaya C
16-Mar-13 13:37pm
View
;)
Chinmaya C
16-Mar-13 13:32pm
View
actually you are creating a blank DataTable in the for loop, which is getting binded with dropdowns, so no data is displayed...
I have modified your cde... please try with the following ...
SqlDataAdapter da1 = new SqlDataAdapter("select * from vehicle_category", con);
DataTable dt = new DataTable();
da1.Fill(dt);
DropDownList[] arr = {ddlvnameri1, ddlvnameri2 };
foreach (var d in arr) {
d.DataSource = dt;
d.DataTextField = "vehicle_name";
d.DataValueField = "vehicle_id";
d.DataBind();
}
Chinmaya C
16-Mar-13 13:20pm
View
are you getting any error message?
Chinmaya C
16-Mar-13 13:18pm
View
I guess the question is about displaying the dropdown list in alphabetic manner (sorted order).
If this is the requirement then you can apply sorting on data source...
List<string> list = .....; // logic to get the list of data to display
list.Sort((a, b) => string.Compare(a, b));
DropDown1.DataSource = list;
DropDown1.DataBind();
Hope this helps...
Chinmaya C
16-Mar-13 13:07pm
View
Dim sql As String = "select * from court where courtid='" & ddlfromsec.SelectedValue & "'"
As per my understanding form the posted code, you are applying equal operator on primarykey field (courtid), it always returns only one record, and thus shows only one record everytime.
try with the following:
Dim sql As String = "select * from court"
Chinmaya C
16-Mar-13 12:52pm
View
Try with the following:
private void cb_Faculty_Code_SelectedIndexChanged(object sender, EventArgs e)
{
int irows = 0;
try
{
sql = "Select [Available_date],[Session1],[Session2],[Session3],[Session4] from Tb_Faculty_Availability where Faculty_code = '" + cb_Faculty_Code.Text.ToString() + "'";
// method to fill into dataset
DataSet ds = .........; // Fill DataSet
DGVCalendar.DataSource = ds;
DGVCalendar.DataBind();// if it is a web application. in case of windows application this line is not needed.
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error");
return;
}
Chinmaya C
15-Mar-13 22:34pm
View
there are 3 observations:
1.
if (str=="" AND st1=="")
in the above line AND is invalid instead you should use && operator.
2.
xmlhttp.open("GET","http://www.tndte.com/Result/Default2.aspx?Value="+str"regul="+st,true);
here parameters are not properly given, rather you should write as follows:
xmlhttp.open("GET","http://www.tndte.com/Result/Default2.aspx?Value="+str+"®ul="+st,true);
3.
var s = document.getElementById('reg').value;
var ss = document.getElementById('s1').value;
where as in the html design you don't have any control with id 'reg' and 's1'. you have assigned name to the controls but ids are not given.
<input type="text" name="reg"/>
please correct these and try to invoke.
Chinmaya C
15-Mar-13 8:24am
View
happy to help... :)
Chinmaya C
14-Mar-13 14:34pm
View
What I believe, In case of checkbox if you are accessing through request.forms[], then you will get value="on" if checkbox is selected, otherwise you will get null.
Chinmaya C
14-Mar-13 13:54pm
View
It will be better if you can provide the design code of the page. From the code which you are provided, it is not very clear.
Chinmaya C
14-Mar-13 13:03pm
View
then you need to use relative path which starts from the application folder.
for example if the images folder is there in one-level up as the application folder then you need to write as follows:
string ImgExist = Path.Combine(path, "../images/" + stamp + ".jpg");
And if it inside a sub-folder (example the folder name is : resources) of application directory then you need to write as follows:
string ImgExist = Path.Combine(path, "resources/images/" + stamp + ".jpg");
Hope this helps. :)
Chinmaya C
14-Mar-13 12:27pm
View
try with the following code:
string path = Assembly.GetExecutingAssembly().Location;
string ImgExist = Path.Combine(path, "images/" + stamp + ".jpg");
The above code will work if images is a folder in the same directory where the executable resides.
Show More