15,915,509 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 bobb024 (Top 41 by date)
bobb024
13-May-15 14:53pm
View
yes, this is a control that lives on an ASPX page and below is the sort method
protected void SortGridView(string sortExpression, string direction)
{
DataTable dataTable = SourceTable;
if (dataTable != null)
{
DataView dataView = new DataView(dataTable);
dataView.Sort = sortExpression + " " + direction;
SourceTable = dataView.ToTable();
GridView1.DataSource = SourceTable;
GridView1.DataBind();
int pageindex = GridView1.PageIndex;
}
}
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
isSort = true;
string sortExpression = e.SortExpression;
ViewState["SortExpression"] = sortExpression;
if (GridViewSortDirection == SortDirection.Ascending)
{
isAscend = true;
SortGridView(sortExpression, "ASC");
GridViewSortDirection = SortDirection.Descending;
}
else
{
isAscend = false;
SortGridView(sortExpression, "DESC");
GridViewSortDirection = SortDirection.Ascending;
}
}
bobb024
5-May-15 14:16pm
View
DropDownList ddlChanges = row.Cells[qtyColumn.Ordinal].Controls[0] as DropDownList;
bobb024
4-May-15 16:39pm
View
it shows 20 visually but when I fire the button, it is not saving correctly
bobb024
2-May-15 15:58pm
View
I added the save method above. Also for the original value comment, for instance, the row has a value of 1 in the drop down list, then I sort the list and change the quantity to 20, it is still saving the first value (ie 1)
bobb024
2-May-15 15:54pm
View
Deleted
<pre lang="c#">
public List<string> GetLevelSignsToBeSaved()
{
List<string> selectedIds = new List<string>();
List<stat> stats = new List<stat>();
DataColumn promoColumn = SourceTable.Columns["Column_PROMOTION"];
DataColumn qtyColumn = SourceTable.Columns["Column_QTY"];
DataColumn promo2Column = SourceTable.Columns["Column_ADDPROMO"];
DataColumn qty2Column = SourceTable.Columns["Column_2QTY"];
DataColumn printedColumn = SourceTable.Columns["Column_PRINT"];
if (promoColumn != null || qtyColumn != null || promo2Column != null || qty2Column != null)
{
foreach (GridViewRow row in this.GridView1.Rows)
{
List<levelsign> Signs = new List<levelsign>();
LevelSign LevelSign = new LevelSign();
LevelSign secondSign = new LevelSign();
if (promoColumn != null)
{
if (row.Cells[promoColumn.Ordinal].Controls.Count > 0)
{
DropDownList ddlChanges = row.Cells[promoColumn.Ordinal].Controls[0] as DropDownList;
if (ddlChanges is DropDownList)
{
if (ddlChanges.SelectedValue != "" && Convert.ToInt32(ddlChanges.SelectedValue) != 0)
{
string levelSignId = ddlChanges.ID.Split('_')[2];
LevelSign = LevelManager.GetLevelSignByLevelSignIdSimple(Convert.ToInt32(levelSignId));
if (LevelSign.StampID == Convert.ToInt32(ddlChanges.SelectedValue))
{
//do nothing
}
else
{
LevelSign.StampID = Convert.ToInt32(ddlChanges.SelectedValue);
stats.Add(StatManager.makeStat(LevelSign.SignID, LevelSign.LevelID, LevelSign.LevelID, LevelSign.sign.DepartmentID, LevelSign.StampID, (int)tsUtil.stattype.vChangeSizeAtMatrix, DateTime.Now, LevelSign.LevelSignQuantity));
}
}
}
}
}
if (qtyColumn != null)
{
if (row.Cells[qtyColumn.Ordinal].Controls.Count > 0)
{
DropDownList ddlChanges = row.Cells[qtyColumn.Ordinal].Controls[0] as DropDownList;
if (ddlChanges is DropDownList)
{
if (ddlChanges.SelectedValue != "" && Convert.ToInt32(ddlChanges.SelectedValue) != 0)
{
if (LevelSign.LevelSignQuantity == Convert.ToInt32(ddlChanges.SelectedValue))
{
//do nothing
}
else
{
LevelSign.LevelSignQuantity = Convert.ToInt32(ddlChanges.SelectedValue);
stats.Add(StatManager.makeStat(LevelSign.SignID, LevelSign.LevelID, LevelSign.LevelID, LevelSign.sign.DepartmentID, LevelSign.sign.StampID, (int)tsUtil.stattype.vChangeQuantityAtMatrix, DateTime.Now, LevelSign.LevelSignQuantity));
}
}
}
}
}
if (promo2Column != null)
{
if (row.Cells[promo2Column.Ordinal].Controls.Count > 0)
{
DropDownList ddlChanges = row.Cells[promo2Column.Ordinal].Controls[0] as DropDownList;
if (ddlChanges is DropDownList)
{
bobb024
1-May-15 13:02pm
View
anyone have any thoughts
bobb024
26-Jan-15 12:42pm
View
https://www.flickr.com/photos/130950903@N02/
above is a picture of what is happening. The full menu is built vertically before the page fully loads and then snaps back to horizontal
bobb024
23-Jan-15 14:05pm
View
any thoughts, and I dont agree with this question being marked as 1. Maybe the site should allow for screen shots
bobb024
22-Jan-15 15:14pm
View
Deleted
.CssMenu ul.AspNet-Menu li.AspNet-Menu-Selected
{
background: #1d68ac;
display:none;
}
<style type="text/css">
.divBodyBox {
max-height: 100%;
max-width: 100%;
position: relative;
top: 0;
left: 0;
}
.newMain {
box-shadow: 0px 0px 15px 10px #888888;
border: 5px solid;
/*/ Firefox /*/
-moz-border-radius: 25px;
/*/ Safari and chrome /*/
-webkit-border-radius: 25px;
/*/ Linux browsers /*/
-khtml-border-radius: 25px;
/*/ CSS3 /*/
border-radius: 25px;
/*behavior: url(border-radius.htc);*/
behavior: url(PIE.htc); /*IE fix for: border-radius, box-shadow, */
width: 90%; max-height:100%;
margin: 0px auto 0px auto;
background-color: #fff;
}
.newPage {
box-shadow: 0px 0px 15px 10px #888888;
border: 5px solid;
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
-khtml-border-radius: 25px;
border-radius: 25px;
background-color: #fff;
margin: 0px auto 0px auto;
/*behavior: url(border-radius.htc);*/
behavior: url(PIE.htc); /*IE fix for: border-radius, box-shadow, */
}
.newTableMargin {
width: 95%; height: 100%; margin-left:5%;
}
.newTd {
width: 100%; height: 100%;
}
</style>
</head>
<body id="bdyMaster" class="divBodyBox" runat="server">
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" ScriptMode="Release" EnableScriptGlobalization="true" CombineScripts="true" runat="server">
<ul>
<asp:Menu ID="NavigationMenu" runat="server" CssSelectorClass="CssMenu" Orientation="Horizontal" StaticSubMenuIndent="10px">
<dynamichoverstyle bordercolor="Yellow" borderstyle="None" backcolor="#7C6F57" forecolor="White">
<statichoverstyle bordercolor="Yellow" borderstyle="None" backcolor="#7C6F57" forecolor="White">
<staticmenuitemstyle horizontalpadding="5px" verticalpadding="2px">
<staticselectedstyle borderstyle="Solid" bordercolor="Black" borderwidth="5px" backcolor="#5D7B9D">
<dynamicselectedstyle borderstyle="Solid" bordercolor="Black" borderwidth="5px" backcolor="#5D7B9D">
<dynamicmenuitemstyle horizontalpadding="5px" verticalpadding="2px">
<dynamicmenustyle cssclass="DynamicMenu" horizontalpadding="0px" verticalpadding="0px" backcolor="#F7F6F3">
</ul>
<ul class="newMain">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
<table style="width: 100%; height: 100%">
<tr style="text-align: center">
<td id="tdContentContainer" valign="top" align="center">
<asp:ContentPlaceHolder ID="mainContentPlaceHolder" runat="server">
</td>
</tr>
</table>
</ul>
<ul>
<br />
</ul>
</form>
</body>
</html>
bobb024
22-Jan-15 14:49pm
View
I have a screen shot but I do not see where I can upload that too
bobb024
12-Dec-14 12:15pm
View
you are right, i fixed above
bobb024
12-Dec-14 12:15pm
View
you are correct, posted correctly now
bobb024
12-Dec-14 12:14pm
View
Deleted
this is a solution, i transitioned this
public static List<person> ToPersonListFull(this IDataReader dataReader)
{
var returnList = new List<person>();
while (dataReader.Read())
{
var Person = new Person()
{
PersonID = Int32.Parse(dataReader["PersonID "].ToString()),
Name = dataReader["Name"].ToString(),
AddressID = Int32.Parse(dataReader["AddressID"].ToString()),
Address = new Address ()
{
AddressID = Int32.Parse(dataReader["tAddressID "].ToString()),
PersonID = Int32.Parse(dataReader["tPersonID "].ToString()),
Address1 = dataReader["Address1"].ToString(),
ZipCode = Int32.Parse(dataReader["ZipCode"].ToString()),
},
};
returnList.Add(Person);
}
return returnList;
}
I was able to set t.AddressID as tAddressId and t.PersonID as tPersonId and easily able to find and link it in the code, so i can access AddressID and tAddressID, PersonID and t.PersonID and get the right values.
bobb024
2-Jul-14 12:41pm
View
so basically I have built three scenarios. Locally instantiating the object and having numerous round trips but storing nothing in the viewstate. Then another where I am grabbing data and storing them in the viewstate on each different page while the last has the data storing in the session and using that throughout the application. The question I have, is for a slow connection (512 or less) which operating of storing and passing data is most preferred or is there any testing tools you can all recommend to test this
bobb024
17-Jun-14 21:54pm
View
user and application data
bobb024
17-Jun-14 18:22pm
View
the connection is at the will of the users of the application and their budget restrictions.
I am more looking for ideas if the session gets to big or viewstate then you will encounter an issue but if no advice to offer, than thank you
bobb024
26-Mar-14 18:01pm
View
Thank you Tomas, it is a 1-1 relationship, and when I am doing the join the data populates back but I am unable to assign it because of that error, and that seems to be the issue. Any help or concept I need to look into would be great. I am processing with this type of SQL
PROCEDURE [dbo].GetTableByTableIdOnly
-- Add the parameters for the stored procedure here
@Id int
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Type int;
DECLARE @Id int;
-- Insert statements for procedure here
SELECT TOP 1 @Type = y.type, @InfoId = r.InfoId
from Table y join Table r on
r.InfoId = y.InfoId
where r.Id = @Id
IF @Type = 4
BEGIN
SELECT * FROM Table (nolock) WHERE Id= @Id;
Execute StoredProc @Id;
END
where the Execute StoreProc is a secondary call and a join.
bobb024
25-Mar-14 18:57pm
View
when this method is called, it is outside of the Index range
public static Stamp ToStampObject(this IDataReader dataReader)
{
Stamp stamp = null;
while (dataReader.Read())
{
stamp = new Stamp()
{
//assign content
};
}
return stamp;
}
bobb024
24-Jan-14 14:35pm
View
the button is a normal aspnet button, where the results are to display in an asp image, not image button
bobb024
23-Jan-14 13:08pm
View
.NET 4.5 and my dev is windows 8.1 and server is windows server 2012
bobb024
22-Jan-14 20:16pm
View
I am using IE 11
bobb024
10-Dec-13 22:06pm
View
I am also using a master page
bobb024
10-Dec-13 22:05pm
View
ok - I have been able to replicate it in my dev environment and I am able to use below to fix it on an IE emulated browser, however on older PCs that do not have windows 7, it still will not render.
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> is the preferred
"IE=edge"
"IE=10"
"IE=EmulateIE10"
"IE=9"
"IE=EmulateIE9
"IE=8"
"IE=EmulateIE8"
bobb024
7-Nov-13 14:34pm
View
I have used dynamicselectedstyle and staticselected style as well as trying to invoice some looping code to see what is selected but to no avail. I have two sets of image buttons, one grey and one blue, over the hover and selection i would like to use the blue for each icon. I cant seem to get it working with css or javascript up until this point
bobb024
24-Oct-13 15:22pm
View
awesome, thank you!
bobb024
23-Oct-13 15:47pm
View
Hello Sergey,
I am trying to in the C# code behind when a local variable is set to true, hide the input radio button with the ID of "Future"
so something of the variation of
bool hfWOP = true;
hfWOP = Return Value of manager;
if (hfWOP == true)
//set future button display to none, ie hide it
bobb024
11-Oct-13 15:24pm
View
<asp:ContentPlaceHolder ID="contentMenu" runat="server">
<div class="hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal" Font-Size="Smaller" OnMenuItemClick="NavigationMenu_MenuItemClick">
</div>
protected void NavigationMenu_MenuItemClick(object sender, MenuEventArgs e)
{
//fire popup, but not getting hit
}
bobb024
5-Jul-13 17:28pm
View
IE is caching the image so they do not think that it is different seems to be the issue
bobb024
4-Jul-13 13:01pm
View
I should also note that it works with the first request, but a change and then resubmission of the button does not work. i am drawing a PS proof inside a image from a form
bobb024
4-Jul-13 12:43pm
View
it will work in Chrome but not IE
bobb024
1-Jul-13 22:05pm
View
the problem is that the check boxes are not maintaining the check after looping through the list, all the items in my test case should be set to true and they are getting marked as true but nothing is maintaining that checked state
bobb024
29-Apr-13 18:00pm
View
I am looking to compare to numbers and currently I have
if (FractionToDouble(parse.salePriceValue) > FractionToDouble(parse.regularPriceValue))
{
rejectedList.Add(data[0] + ", Regular Price cannot be Higher than Sale Price");
createSign = false;
}
public static double FractionToDouble(string fraction)
{
double result;
if (double.TryParse(fraction, out result))
{
return result;
}
string[] split = fraction.Split(new char[] { ' ', '/' });
if (split.Length == 2 || split.Length == 3)
{
int a, b;
if (int.TryParse(split[0], out a) && int.TryParse(split[1], out b))
{
if (split.Length == 2)
{
return (double)a / b;
}
int c;
if (int.TryParse(split[2], out c))
{
return a + (double)b / c;
}
}
}
throw new FormatException("Not a valid fraction.");
}
bobb024
15-Apr-13 20:28pm
View
thank you for the AMAZING feedback, makes you feel good after a day like today in Boston. Much appreciated and I will start looking into this ASAP
bobb024
15-Apr-13 20:27pm
View
I will be sure to look into this ASAP
bobb024
15-Apr-13 20:22pm
View
The file format is in DTA, but I end up replacing it and saving it as a .txt. Now I am going to add some breaks to the long if else, and transition them to case statements probably. Also, i am going to try to do the read line within the using statement for the streamreader so i can just read line by line. Any additional help would be great!
bobb024
15-Apr-13 17:19pm
View
I am not looking for someone to sift through my code, or debug it, i am showing the overall concept of the bottle neck portion so people can get an idea of the structure and help stimulation other ideas. For every potent Sign i make, you can see there are a lot of secondary inserts that need to occur, creating multiple (up to 15 signfields) and one levelsign.
bobb024
7-Jan-13 21:41pm
View
does anyone know how to access the value of document.forms? I have searched high and low as when I debug it, I am able to see that the document.forms has a count of 1 but I cannot find the actual name. I have tried to put up a watch and still not able to find the value
bobb024
7-Jan-13 19:53pm
View
this does not work, it seems to be having a problem accessing the information within the asp:Contentplaceholder
bobb024
7-Jan-13 12:03pm
View
Basically I am trying to access the asp hiddenfields values on what was the body declaration of the form with the ID of "form1". form1 is now part of the master page and now that value and $(window) are coming as null in the JavaScript code. hfAhead is a hidden field found on the aspx page. I am unable to seemingly access document.form[form1] now at runtime
bobb024
6-Jan-13 21:51pm
View
any help would be much appreciated
bobb024
5-Jan-13 12:27pm
View
the javascript values, ie documents.form[form1].hfAhed is coming back as null reference object.
Show More