15,887,596 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 Codes DeCodes (Top 144 by date)
Codes DeCodes
21-Jul-22 7:57am
View
Thanks for the link. Came to conclusion that I am duplicating a tab on windows.open and "Duplicating a tab copies the tab's sessionStorage into the new tab." as per link you have attached. That's how session storage is being passed to new tab.
Codes DeCodes
27-Oct-19 0:23am
View
Jaime, two changes fixed my issue:
1: Execute below script to enable change tracking in sql. This will configure your db notify immediately when changes occurs in tables:
ALTER DATABASE [Test_test]
SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
2: In sql, Security -> Logins, make sure that user exists using whose credentials you are login into db from application. And make sure that this user has full permission to read/write
Codes DeCodes
25-May-19 1:59am
View
Thanks for the information.
So what do you suggest for maintaining timer for single user (chances are multiple user can log in via different browser on same computer).
Is it ok to not use static like this?
private System.Timers.Timer aTimer;
Codes DeCodes
23-May-19 7:09am
View
this should not be an issue because aTimer is global and instance of aTimer can be accessed in different phase of execution.
Codes DeCodes
22-Mar-19 2:07am
View
Exactly what I wanted. Thanks...
Codes DeCodes
19-Mar-19 8:39am
View
I used this as shown in the link.. Still getting null.
Please let me know if I am doing some mistake.
@for (var i = 0; i < Model.Count(); i++)
{
@Html.TextBoxFor(m => Model.ElementAt(i).Name) @Html.TextBoxFor(m => Model.ElementAt(i).Address) @Html.TextBoxFor(m => Model.ElementAt(i).Gender) @Html.TextBoxFor(m => Model.ElementAt(i).Adult) @Html.TextBoxFor(m => Model.ElementAt(i).Child)
}
Codes DeCodes
19-Mar-19 8:38am
View
Deleted
I used this as shown in the link.. Still getting null.
Please let me know if I am doing some mistake.
@for (var i = 0; i < Model.Count(); i++)
{
@Html.TextBoxFor(m => Model.ElementAt(i).Name) @Html.TextBoxFor(m => Model.ElementAt(i).Address) @Html.TextBoxFor(m => Model.ElementAt(i).Gender) @Html.TextBoxFor(m => Model.ElementAt(i).Adult) @Html.TextBoxFor(m => Model.ElementAt(i).Child)
}
Codes DeCodes
13-Mar-19 12:54pm
View
Somewhere I found formsauthenticaion class and now I am using that..
Anyways, thanks...
Codes DeCodes
13-Mar-19 11:41am
View
This link only tells about authentication for the first time. What I am looking for is that piece of code for authenticating user every time he logs in using tables from database.
Codes DeCodes
7-Mar-19 13:09pm
View
Thanks for investing your time in this.. It worked... Thanks Man..
Codes DeCodes
7-Mar-19 12:15pm
View
XML updated. see below. Still showing same error
Codes DeCodes
7-Mar-19 12:15pm
View
XML updated. see below. Still showing same error
Codes DeCodes
7-Mar-19 12:13pm
View
Deleted
<vehicles>
<fourwheeler>
<availability>
<brand>Toyota
<model>Fortuner
<country>Japan
<cost>90000
<availability>
<brand>Hyundai
<model>Elentra
<country>South Korea
<cost>75000
<availability>
<brand>Volkswagan
<model>Polo
<country>Gremany
<cost>95000
<availability>
<brand>Tata
<model>Nano
<country>25000
<cost>
<twowheeler>
XML updated. but still facing same error...
Codes DeCodes
6-Mar-19 3:24am
View
No, this is just a example. I have different username and password.
Codes DeCodes
3-Mar-19 11:21am
View
Yes, did it. But same exception..
public static async Task<List<tblusertype>> GetAll()
{
string apiHost = ConfigurationManager.AppSettings["ApiHost"];
using (var client = new HttpClient())
{
List<tblusertype> result = new List<tblusertype>();
client.BaseAddress = new Uri(apiHost);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var response = await client.GetAsync("api/UserType");
if (response.IsSuccessStatusCode)
{
result = response.Content.ReadAsAsync<List<tblusertype>>().Result;
//return Task.FromResult<tblusertype>(result);
return null;
}
else
{
return null;
}
}
}
Codes DeCodes
22-Feb-19 12:19pm
View
Thanks for your time to reply me in such a descriptive way. Made me all clear.
Codes DeCodes
8-Dec-16 7:21am
View
Got the point. Though I was using <updatepanel> and using response to export. I removed <updatepanel> and it worked the way I wanted...
Codes DeCodes
3-Oct-16 23:42pm
View
I do not want to use window services. I am not able to correctly debug. In my debugguing, codes executes only once. But on server when time triggers, it is creating an issue..
Codes DeCodes
3-Oct-16 8:39am
View
Deleted
I do not want to use window services. I am not able to correctly debug. In my debugguing, codes executes only once. But on server when time triggers, it is creating an issue..
Codes DeCodes
8-Sep-16 7:51am
View
mailMessage.IsBodyHtml = true;
I tried this but it is not working in my case..
Codes DeCodes
24-Jul-16 0:58am
View
it was just blunder.. any way thanks
Codes DeCodes
17-Jan-16 11:17am
View
In error.aspx page
Codes DeCodes
17-Jan-16 11:03am
View
Just found that on removing redirectmode="responserewrite" from customerror tag, its rendering. However i have used this code to use Server.GetlastError() method. I need this method .
Codes DeCodes
17-Jan-16 10:23am
View
<customerror mode="on" defaultredirect="error.aspx" redirectmode="responserewrite">
Appology for code, i am using mobile phone for this post..
Indeed, it is hitting pageload of error.aspx but rendering abc.aspx in browser...
Codes DeCodes
22-Sep-15 11:39am
View
I set the configuration to release mode, then i updated my code and rebuild the solution. After that, I pasted the solution dll file into server. Here updated code is not showing when i browse apps from server.
Codes DeCodes
26-Aug-15 11:24am
View
really thanks for ur comment,I appreciate it..
Codes DeCodes
26-Aug-15 11:24am
View
now, server is made over windows 7 OS.. i believe i will install.NET Framework 4.0 on server and try
Codes DeCodes
31-Jul-15 11:28am
View
thanks.... can you please provide me link to download those ad-block tools.
Codes DeCodes
31-Jul-15 11:28am
View
yes, the ads are bothering my usability.. how can i control those ads???? By that do you meant installing adon to prevent it..
Codes DeCodes
29-Jul-15 11:17am
View
I removed update panel from the page where in was the code to export. Now its working...
Codes DeCodes
14-Jul-15 11:48am
View
thanks for the link,,, will try this and let you know....
Codes DeCodes
22-May-15 12:51pm
View
I just noticed one thing. If I am connected to internet,my login page shows ads and page keeps on loading, in this case, forgot password is not being redirected. Else, if i am not connected to the internet, page loads instantly, so page is being redirected to default page...
Codes DeCodes
20-May-15 3:33am
View
I am not getting any error at all.. on click of forgot password, nothing happens except for url in address bar changing to http://localhost:2040/GUI/Login.aspx?ReturnUrl=%2fGUI%2fForgotPassword.aspx[^] from http://localhost:2040/GUI/Login.aspx.
Codes DeCodes
14-May-15 4:38am
View
Thanks.. I used 2._ _ ,for 2.23.
Codes DeCodes
5-Mar-15 11:23am
View
yes, i did...the code on page load is
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
BindGrid();
}
}
private void BindGrid()
{
Transaction transaction = new Transaction();
gridTransaction.DataSourceID = string.Empty;
gridTransaction.DataSource = transaction.GetAllTransactionEntrySaved();
gridTransaction.DataBind();
}
Still, on rowcommand, null value is being shown..
Codes DeCodes
22-Sep-14 6:30am
View
done.. this is not working. anyway thanks for the link kornfeld
Codes DeCodes
11-Sep-14 1:45am
View
i am working on asp>net..
Codes DeCodes
3-Aug-14 12:15pm
View
thanks for the link peter. I guess Umbraco and any other CMS reduces the need of heavy design.. My need is to focus much on server side coding and business logic instead of design to reduce such tier being written from 0 level..
Codes DeCodes
28-Jul-14 1:50am
View
thanks ryan.. I will try this and return to you...
Codes DeCodes
27-Jul-14 12:40pm
View
thanks SA.. I am storing expire date in same database server where user records reside. My issue .is in doing so, expire date is exposed to client so is vulnerable. How can I keep expire date secure away from user!!! Is expiration data storage you mentioned above a jargon of Visual Studio i done know!!! Because i am looking for such jargon of SQL or VS to keep there information secure from client
Codes DeCodes
27-Jul-14 12:26pm
View
ya SA. I am new so was unaware... I was planning to encrypt expire date and store in same database.. Which practice will you recommend is best to do so???
Codes DeCodes
16-Jul-14 3:20am
View
ya. grid is placed inside update panel.. actually i am developing a calender. So, on page load, first 10 days are shown, What is required is if date is 16, then as page opens, 2nd page of gridview to be displayed. Here, as page loads, date from 1 to 10 is shown.
Codes DeCodes
6-Jul-14 2:51am
View
thanks nguyen..
Codes DeCodes
2-Jul-14 3:43am
View
thanks for your comment raul
Codes DeCodes
25-Jun-14 7:07am
View
As i am new to this, i do not know much about it.. Can you provide me link of this!!
Codes DeCodes
23-Jun-14 6:13am
View
anyway thanks..
Codes DeCodes
23-Jun-14 5:38am
View
is there a privacy issue that mozilla is not willing to share with???
Codes DeCodes
12-Jun-14 4:38am
View
by common date.. like if date is 2014-6-6. then by status "in" location xyz is shown as location in and of status "out" on that date location "abc" is shown as location out..
Codes DeCodes
5-Jun-14 7:30am
View
try searching for javascript function.. u can use pop up function of javascript..
Codes DeCodes
5-Jun-14 7:20am
View
question is bit unclear. anyway you need to use join to get data from two tables based on key.
Codes DeCodes
5-Jun-14 5:43am
View
thans for your knowledge and logic.. will try that
Codes DeCodes
4-Jun-14 1:13am
View
can we simply copy and paste machinekey elements or does .net framework matters..
Codes DeCodes
11-May-14 0:45am
View
thanks kan its working...
Codes DeCodes
9-May-14 1:21am
View
as i am new in sql, i donot know much about it. can you tell where should i place getdate() function in sql??
Codes DeCodes
9-May-14 1:13am
View
is it that getdate() is to be placed in stored procedure and application automatically returns in system.datetime.now or where to place getdate() in sql..
Codes DeCodes
7-May-14 7:09am
View
protected void Page_Load(object sender, EventArgs e)
{
LoginDetail loginDetail = new LoginDetail();
if (!IsPostBack)
{
if (Session["LoginName"] != null && Session["Password"] != null)
{
HtmlGenericControl body = this.Master.FindControl("body") as HtmlGenericControl;
body.Attributes.Add("onload", "location_Track();");
string loginName = (String)(Session["LoginName"]);
loginDetail = clsBLogic.GetLoginDetailByUserName(loginName);
if (loginDetail.UserType == "Administrator")
{
gvEmployeeStatusToday.Visible = true;
lblDate.Visible = true;
txtDate.Visible = true;
txtDate.Text = NTPTime.GetNepalDateTimeFromNTPServer().ToString("MM/dd/yyyy");
BindEmployeesTodayStatus(txtDate.Text);
}
FillCheckInFieldset();
FillCheckOutFieldset();
HideNotification();
}
else Response.Redirect("default.aspx");
}
}
this is the code of home page load.. i had tried redirecting to other pages as well but still it is not working,,
Codes DeCodes
7-May-14 7:05am
View
ya ... i had used debugger and code reaches at response.redirect
Codes DeCodes
23-Apr-14 5:37am
View
thanks for your reply... i will try this..
Codes DeCodes
23-Apr-14 0:56am
View
thanks for your reply. as i am new to it.. can u tell from where i can set dirextory as web application.. or is there any link you can provide me...
Codes DeCodes
12-Apr-14 2:21am
View
you can check your firewall.. turn it off.. server side code did not worked for me... so i did coding on client side... search on google - reverse geo-coding for this.. you will get as much code as u want...
Codes DeCodes
10-Apr-14 7:38am
View
thanks man.. its working.. knew that mozilla doesnot support my code...
Codes DeCodes
9-Apr-14 3:31am
View
thanks for the link man...
Codes DeCodes
6-Apr-14 7:17am
View
thanks for your comment... bt i did not worked out for me.. so i did all the coding on client side.. using code for reverse geocoding.. and its working for me...
Codes DeCodes
31-Mar-14 0:51am
View
ok.. anyway thanks ...
Codes DeCodes
30-Mar-14 6:38am
View
thanks for link.. i got an error unable to connect to remote server on solution 5 code line 3.. where as the page is opened when i pasted the address in browser and opened it... do you have any idea about it???
Codes DeCodes
26-Mar-14 7:08am
View
i also needed this in my web application..i tried it.. as this code reaches http://www.freegeoip.net/xml, it shows me error "Unable to connect to the remote server".. i typed the address in my browser http://www.freegeoip.net was opened and address of my city was opened.. now as i typed http://www.freegeoip.net/xml/(myIP) in browser , "RD Reserved" is shown... any help in what is happening??
Codes DeCodes
26-Mar-14 7:05am
View
thanks for the link jas.. i will try your link...
Codes DeCodes
26-Mar-14 6:53am
View
Deleted
i also needed this in my web application..as this code reaches http://www.freegeoip.net/xml, it shows me error "Unable to connect to the remote server".. i the server on nowdays????
Codes DeCodes
26-Mar-14 6:20am
View
no problem if i get approximate location..
Codes DeCodes
26-Mar-14 6:18am
View
thanks a lot for link jas.. by the link, i can get street address based on latitude and longitude... do you know how can i get latitude and longitude of a place from where user has logged??? i had done tonns of research but was not able to get exact result.. all pointed to the latitude and longitude of ISP .. not the computer from where user has logged in...
Codes DeCodes
26-Mar-14 6:05am
View
well, what i wanted is a code to get latitude and longitude of the place from where user has logged in. from the latitude and longitude received, his street address is to be traced.. Do you know how it is done???
Codes DeCodes
26-Mar-14 2:23am
View
jas, thanks for the link... this link takes ip of isp and returns city but not street address within city... is there a way to return street address as well. i doubt???
Codes DeCodes
25-Mar-14 1:13am
View
thanks for reply man
Codes DeCodes
25-Mar-14 1:13am
View
thanks for reply man,,, it worked after a lot of research and code editing,, credit to u for knowledge..
Codes DeCodes
23-Mar-14 4:48am
View
Deleted
i updated datacontext and now its working...
Codes DeCodes
17-Mar-14 4:06am
View
yes you were right... i deployed it in iis and its working now.. anyway thanks for you reply,,,,
Codes DeCodes
13-Mar-14 6:26am
View
thanks karthik.. it worked..
Codes DeCodes
13-Mar-14 6:13am
View
the error i types here was detected by using debugger.. any way thanks for the suggestions...
Codes DeCodes
13-Mar-14 6:10am
View
u were right matt and sa..null was not handled.. thanks..
Codes DeCodes
11-Mar-14 20:13pm
View
sure karthik.
Codes DeCodes
5-Mar-14 1:52am
View
thanks you for help ..
Codes DeCodes
4-Mar-14 2:23am
View
thanks for the help.. i will try and let u know..
Codes DeCodes
18-Feb-14 0:32am
View
i am new to it... can you please tell me how can i run services on port 82??
Codes DeCodes
16-Feb-14 5:19am
View
well the port number used by webservice is set to 90 on customsetting file... guess doing this should work!!!...
Codes DeCodes
4-Feb-14 5:24am
View
ya karthik.. i had done the same the same but was unaware of window.showModalDialog and document.getElementById('txtValues').value = value; so i initially i thought u r passing txtvalues to popup.. now its crystal clear and btw thanks a lot.. u r real programming guru..
Codes DeCodes
4-Feb-14 5:15am
View
thanks for the link jocodes..
Codes DeCodes
4-Feb-14 5:14am
View
thanks a lot karthik.. it is solved.. lots of thanks to you..
Codes DeCodes
4-Feb-14 4:55am
View
yes. i have used it..
Codes DeCodes
4-Feb-14 2:35am
View
Deleted
thanks for the code ... as i am new in programming, idk much.. can u tell me how to pass temp value to main page???
Codes DeCodes
4-Feb-14 1:50am
View
this code is not showing popup.. instead,, on click of btnClose, window.close() is only executed.. what i did was simply pasting ur code but no response is shown except closing window..
Codes DeCodes
4-Feb-14 1:03am
View
i prefer radio button bcoz only one item is to be selected in popup
Codes DeCodes
31-Jan-14 5:21am
View
thanks for the idea .. anyway i used ClientScript.RegisterStartupScript and now its working..
Codes DeCodes
31-Jan-14 3:58am
View
i tried ur code. it is not working i tried another code for opening openPdfReport.aspx page ..
ClientScript.RegisterClientScriptBlock(Page.GetType(), null, "window.open('PdfReport.aspx', '_blank');", true);
its not working too ... but one this works on client side page:OnClientClick="window.open('PdfReport.aspx', '_blank');"
i am totally confused now..
Codes DeCodes
31-Jan-14 1:18am
View
this is my code to open in new tab;
string address = "PdfReport.aspx";
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "page_index_script", "window.open('" + address + "');", true);
it did not worked... i could not understand what is problem.
Codes DeCodes
29-Jan-14 3:35am
View
thanks man.. i will try this and response you...
Codes DeCodes
29-Jan-14 1:10am
View
when i type window. ,it does not show onbeforeunload on list of dropdown.. it is that this method is to be created forcefully??
Codes DeCodes
27-Jan-14 12:25pm
View
thanks man...
Codes DeCodes
27-Jan-14 12:03pm
View
thanks a lot man.. it worked like a charm
Codes DeCodes
27-Jan-14 10:24am
View
thanks for the code man... it is not possible to disable all control of IE without using javascript????
Codes DeCodes
27-Jan-14 3:30am
View
thanks for the code jocodes.. guess it works only when user types pin from keyboard.. in my case,, user selected the number and the number is concated... so in reference to above code for lnkNumberPadSeven_Click, as 7 is pressed on screen, 7 is shown insted of *..
Codes DeCodes
26-Jan-14 6:05am
View
i could not get u ... i could not access TextBox.UseSystemPassword property.. where is it located ???
Codes DeCodes
24-Jan-14 6:22am
View
i had written a code in web.config to increase session time till 9 hours..
<system.web>
<sessionstate timeout="540">
its not working ...any idea..
Codes DeCodes
24-Jan-14 6:08am
View
karthik what i wanted to know is what is life time of that session variable... i know that if session timeouts, then value in it disposes.. or is it that if session variable never timeouts????
Codes DeCodes
21-Jan-14 2:08am
View
thanks karthik...
Codes DeCodes
21-Jan-14 2:08am
View
thank you JoCodes... solved the problem
Codes DeCodes
21-Jan-14 1:54am
View
ya for that the code is ddlLeaveStartdate.SelectedValue = System.DateTime.Now.ToString("MM/dd/yyyy");....
Codes DeCodes
21-Jan-14 1:50am
View
ddl takes system datetime..
Codes DeCodes
21-Jan-14 1:45am
View
ddlLeaveStartdate.SelectedValue = System.DateTime.Now.ToString();
Codes DeCodes
20-Jan-14 2:13am
View
in 3rd line, after new is it field name to be entered or simply enter combination of name, age and position. i could not get it man,,
Codes DeCodes
20-Jan-14 1:03am
View
thanks for the suggestion man..
Codes DeCodes
15-Jan-14 4:16am
View
thanks for the help man
Codes DeCodes
12-Jan-14 4:58am
View
protected void GridViewJobList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string primaryKey = DataBinder.Eval(e.Row.DataItem, "Entry_No") + "";
string jobNo = DataBinder.Eval(e.Row.DataItem, "Source_ID") + "";
string lineNo = DataBinder.Eval(e.Row.DataItem, "Line_No") + "";
e.Row.Attributes.Add("onclick", "opennewwindow('" + primaryKey + "','" + jobNo + "','" + lineNo + "')");
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'");
//e.Row.Attributes.Add("onclick", "ChangeRowColor(this)");
string primarykey1 = (Request.QueryString["primarykey"]);
//if (e.Row.DataItem, p)
//{
// e.Row.BackColor = System.Drawing.Color.Blue;
//}
if (primarykey1 != null)
{
if (primarykey1 == primaryKey)
{
e.Row.BackColor = System.Drawing.Color.Red;
}
}
}
}
on aspx page
var opennewwindow = function (primarykey ,jobNo,lineNo) {
window.location = "MechanicsJobTime.aspx?primarykey=" + primarykey + "&jobNo=" + jobNo + "&lineNo="+ lineNo;
}
man this works but as user clicks on another row.. key value of that row is taken but that particular row is not highlighted to red.
Codes DeCodes
11-Jan-14 23:47pm
View
thanks man,,
Codes DeCodes
11-Jan-14 3:02am
View
man guess u did not got me... what i wanted is to select the row based on primary key.. i have used javascript to extract primary key from grid.. now as page refresh, the row that has that primary key must be selected as blue...
Codes DeCodes
11-Jan-14 1:35am
View
thanks man.
Codes DeCodes
9-Jan-14 23:52pm
View
thanks for the code man..
Codes DeCodes
7-Jan-14 4:12am
View
thanks for the link man...
Codes DeCodes
7-Jan-14 2:00am
View
thanks for the code shree... your code holds page for given time frame only like said by karthik... any help to do so will be appreciated
Codes DeCodes
6-Jan-14 1:59am
View
In aspx page <table> <tr> <td> <asp:GridView ID="GridViewResourceGroup" runat="server" CssClass="gridTable" EmptyDataText="No Record Found" Width="100%" AutoGenerateColumns="false" onrowdatabound="GridViewResourceGroup_RowDataBound"> <asp:BoundField DataField="Code" HeaderText="Code" /> <asp:BoundField DataField="Workplace" HeaderText="Workplace" /> <asp:BoundField DataField="Description" HeaderText="Description" /> </td> </tr> </table> on aspx.cs page protected void GridViewResourceGroup_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'"); } }
Codes DeCodes
6-Jan-14 1:59am
View
In aspx page
<table>
<tr>
<td>
<asp:GridView ID="GridViewResourceGroup" runat="server" CssClass="gridTable"
EmptyDataText="No Record Found" Width="100%"
AutoGenerateColumns="false" onrowdatabound="GridViewResourceGroup_RowDataBound">
<columns>
<asp:BoundField DataField="Code" HeaderText="Code" />
<asp:BoundField DataField="Workplace" HeaderText="Workplace" />
<asp:BoundField DataField="Description" HeaderText="Description" />
</td>
</tr>
</table>
on aspx.cs page
protected void GridViewResourceGroup_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'");
}
}
looking forward for assistance ... thank you
Codes DeCodes
5-Jan-14 1:04am
View
thanks for the link man... will try this soon and tell you if any problem arose...
Codes DeCodes
3-Jan-14 2:16am
View
Deleted
the issue is solved but i wanted to display only MM/dd/yyyy and not time as shown now.. i tried this
<itemtemplate>
<asp:Label ID="lblPromisedDateTime" runat="server" Text='<%# Eval("Promised_Date_Time").ToString()=="1/1/0001 12:00:00 AM"? "":Eval("Promised_Date_Time").ToString('MM/dd/yyyy') %>'>
I wont work.. how can i make to show time only???
Codes DeCodes
3-Jan-14 2:08am
View
thanks for the solution man,,
Codes DeCodes
3-Jan-14 2:00am
View
it did not worked karthik.. actually value of Promised_Date_Time is "1/1/0001 12:00:00 AM".. I tried it this way.
<asp:TemplateField HeaderText="Promise Date Time">
<itemtemplate>
<asp:Label ID="lblPromisedDateTime" runat="server" Text='<%# Eval("Promised_Date_Time")=="1/1/0001 12:00:00 AM"?"":Eval("Promised_Date_Time") %>'>
but the value 1/1/0001 12:00:00 AM is still shown.. can it not be done using template field???
Codes DeCodes
2-Jan-14 1:24am
View
thanks man . it helped..
Codes DeCodes
2-Jan-14 1:14am
View
hey man.. can i redirect to new page using javascript???
Codes DeCodes
2-Jan-14 1:08am
View
i want to redirect to new page... how can i do it?
Codes DeCodes
2-Jan-14 1:07am
View
then i should use querystring??? does javascript allows Response.Redirect("Job.aspx");??
Codes DeCodes
2-Jan-14 1:02am
View
thanks for the code karthik.. my javascript code is
<script type="text/javascript">
var opennewwindow = function (primarykey) {
Session["Entry_No"] = Entry_No;
Response.Redirect("Job.aspx");
}
</script>
this code gave me the entry no as desired butpage is not directed to Job.aspx.. any help..
Codes DeCodes
2-Jan-14 0:54am
View
this code created a select button as a column.. bt I dont want this to be created.. what i wanted is to select the row and not to add any other item and use it as a means to pass to other page.
Codes DeCodes
2-Jan-14 0:24am
View
BK 4 code. thanks for your solution. I did it in your way but selectedindexchanged is not fired when i click on the particular row in gridview.. did i missed something??? is there some other features like autopostback = true that i missed out...???
Codes DeCodes
25-Oct-13 0:59am
View
well jocodes, along with the solution you gave I changed few properties of checkbox like repeatcolumn and repeat layout. Now it works.. thanks for the reply.. :)
Codes DeCodes
25-Oct-13 0:35am
View
JoCodes it did not work.. nyway thanks for your comment..
Codes DeCodes
4-Oct-13 0:24am
View
kamran i am using linq..
Codes DeCodes
4-Oct-13 0:23am
View
I have already done that.. DAL fetches gendername property. as mentioned in question the grid works well before search is done means DAL is fetching gendername property..
Codes DeCodes
2-Oct-13 7:21am
View
Dianaa this code reutrns header at first and then textbox throughout the column.. But i want textbox only at second column and then the records from database from third column..
Codes DeCodes
2-Oct-13 5:18am
View
http://www.codeproject.com/Answers/661570/add-textbox-in-row-of-grid-view#answer1
here is the design I want that i had posted earlier.. and thanks in advance.
Codes DeCodes
2-Oct-13 5:13am
View
I am developing the solution in version 3.5 and (e.NewEditIndex) is not supported.. do u have any idea ??
Codes DeCodes
2-Oct-13 5:07am
View
I too faced a similar problem as posted by Mr. Saroj.. your solution created a column.. I want a row to be created instead of column.. Can you plz help..
Codes DeCodes
2-Oct-13 2:02am
View
how to add textbox at the second row?? and not at the last column??
Codes DeCodes
2-Oct-13 2:02am
View
how to add textbox at the second row?? and not at the last column??
Codes DeCodes
2-Oct-13 0:26am
View
ya. got it.. thats a clever technique though.. I was searching for input box using grid view.. Not as a table. Nyway thanks for your help..
Codes DeCodes
1-Oct-13 7:43am
View
thanks for the reply jocodes.. I had tried with
<HeaderTemplate>
<asp:TextBox ID="TextBoxEmployee" runat="server"/>
</HeaderTemplate>
it was just a try and the textbox was shown in header as expected..
Codes DeCodes
26-Sep-13 6:06am
View
thank u Rohan.. it worked.
Show More