Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

just4ulove7

@just4ulove7
About
Posts
65
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Fetching a hidden textbox value in datagrid....
    J just4ulove7

    Yep, the article was pretty cool. As you said, I removed the hidden field, and placed the value i need in a cell. The code goes as below <%#DataBinder.Eval(Container.DataItem,"TaskId")%> Now by iterating I am trying to grab the cells value... foreach (DataGridItem dgItem in dgTimesheet.Items) { TaskId=dgItem.Cells[8].Text; } But still it doesnt show anything in the dgItem.cells[8].text, i checked the cell no. , have kept it visible. It shows in the grid. Can u let me know where I am going wrong? Thanks -- modified at 15:50 Thursday 15th September, 2005

    ASP.NET css sysadmin question

  • Fetching a hidden textbox value in datagrid....
    J just4ulove7

    Yep, that wud work in ItemDatabound event where e is DataGridItemeventArgs I want to iterate through the Datagrid and save each value in the textbox. my code is as follows: dgTimesheet is the datagrid, this is the code behind public void Save() { foreach (DataGridItem dgItem in dgTimesheet.Items) { t.TaskId=((HtmlInputHidden)dgItem.FindControl("txtTask")).Value; saveTask...(some procedure)... } } Here is the aspx code " runat=server> So I need to retrieve txtTask value for each row... Thanks

    ASP.NET css sysadmin question

  • Fetching a hidden textbox value in datagrid....
    J just4ulove7

    Thanks a lot, I put " runat=server> in aspx file, and to access it programatically, i used t.TaskId=((HtmlInputHidden)dgItem.FindControl("txtTask")).Value; But its throwing the error Object reference not set, its not able to search for the control. Where am I going wrong? Thanks

    ASP.NET css sysadmin question

  • Fetching a hidden textbox value in datagrid....
    J just4ulove7

    Hi, I have a datagrid and a textbox(hidden) as an ItemTemplate. There are number of other textboxes which are visible whose values are to be saved by iterating through the grid. Now I also want to store the value of the hidden textbox but when I hide it, it gives the value as "" i.e. empty string. But if I make it visible, it wl show the value and even save it. EnableViewState=True Runat="server"> EnableViewState=True Runat="server"> This is how I am fetching its value in the code-behind. t.TaskId=((TextBox)dgItem.FindControl("txtTaskId")).Text; But t.TaskId contains "" (empty string) if the textbox is hidden, else it shows a value. What can be done abt it? Thanks.

    ASP.NET css sysadmin question

  • Passing parameter values in Asp.net User Controls
    J just4ulove7

    yep, my mistake i pasted the changes in a different class. I modified my message, can u pls have a look at it? Thanks

    ASP.NET csharp asp-net winforms json question

  • Passing parameter values in Asp.net User Controls
    J just4ulove7

    Sorry, I got what you say... but still confused :(. I am pasting my piece of code.. My comments start with ??? Have put my doubts... This is the user control... public abstract class TimeSheetTabs : System.Web.UI.UserControl { protected System.Web.UI.WebControls.DataList lstTabs; ??? This is where I had placed the public variables before.... // public string CurrentTabName; // public string CallersTabName; public string _CurrentTabName=String.Empty; public string _CallersTabName=String.Empty; ???These are the changes that I made by declaring the properties.......... public string CurrentTabName { get{return _CurrentTabName;} set{_CurrentTabName=value;} } public string CallersTabName { get{return _CallersTabName;} set{_CallersTabName=value;} } public class TimeSheetTab { public string Name=String.Empty; public string Url = String.Empty; public string _CurrentTabName=String.Empty; public string _CallersTabName=String.Empty; public TimeSheetTab(string xName, string xUrl) { Name=xName; Url=xUrl; } } private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ArrayList colTabs= new ArrayList(); if (CallersTabName=="TimeSheet") { colTabs.Add(new TimeSheetTab("My Time-Sheet","~/Projects/AddTimeSheet.aspx")); colTabs.Add(new TimeSheetTab("Reportees Time-Sheet","~/Projects/ReporteesTimeSheet.aspx")); } else if (CallersTabName=="Reports") { colTabs.Add(new TimeSheetTab("Tasks","~/Report.aspx?ReportName=Tasks")); colTabs.Add(new TimeSheetTab("Defects","~/Report.aspx?ReportName=Defects")); } lstTabs.DataSource=colTabs; lstTabs.DataBind(); } void lstTabs_ItemDataBound(Object s, DataListItemEventArgs e) { TimeSheetTab objTab= (TimeSheetTab)e.Item.DataItem; HyperLink lnkTab = (HyperLink)e.Item.FindControl("lnkTab"); lnkTab.Text=objTab.Name; lnkTab.NavigateUrl=objTab.Url; if (String.Compare(CurrentTabName,objTab.Name)==0) e.Item.CssClass="adminTabActive"; else e.Item.CssClass="adminTabInactive"; } Can u pls tell me how to access it in the Parent page at cs/vb side? Or send a sample code, that would be quite helpful.:((. I am not getting the property in the intellisense. ... My aspx side goes as ...

    ASP.NET csharp asp-net winforms json question

  • Passing parameter values in Asp.net User Controls
    J just4ulove7

    I am not getting Report1 in the intellisense in code behind, neither it is accessible. So I added protected UserControl Report1; but it doesnot show "CurrentTabName" as property. How to access Report1 in code behind? Thanks

    ASP.NET csharp asp-net winforms json question

  • Passing parameter values in Asp.net User Controls
    J just4ulove7

    Hi, I am new to UserControls in asp.net. I guess, this is a very basic thing that i am implementing, but still not able to find it. I have a user control named Timesheettabs.ascx It has public string CurrentTabName; Now I am including this usercontrol in my aspx page. Say <%@ Register TagPrefix="pm" TagName="Report" Src="~/UserControls/TimeSheetTabs.ascx" %> And this is how I am invoking it in .aspx page. Now I want to initialize the CurrentTabName variable at runtime through codebehind, and the rest of the code is in usercontrol itself. So I just wanted to know how should I pass the value of CurrentTabName through code behind? Thanks

    ASP.NET csharp asp-net winforms json question

  • Validating RadioButtonList Selection through Validation Controls
    J just4ulove7

    Hi, I want to validate radioButtonlist, say I want one of them to be selected before saving it. I placed a custom validator and OnServervalidate, I invoked a function to validate it. But somehow it seems that its not working, Can someone provide me guidelines as how to do it through asp.net validation controls or provide some code? Thanks

    ASP.NET csharp asp-net tutorial question

  • Regarding Crystal report
    J just4ulove7

    Hi... Can someone write me steps how to create a crystal report using a stored procedure. I am new to crystal reports. I made a report by using multiple tables.. but couldnt find an option for stored procedure. I want to do this in C# and asp.net. So can someone help me out. Also give me multiple possibilities of doing it/ some good links... Thanks a lot.

    C# csharp asp-net database help tutorial

  • Encryption/Decryption
    J just4ulove7

    Thanks a lot :)

    C# database security regex announcement

  • Encryption/Decryption
    J just4ulove7

    Hi, I want to encrypt a password and store the encrypted version in the database. then when the user logs in, I want to decrypt the user password and match with the entered password. I read about DESCryptoServiceProvider, but still i am not able to understand it. Can someone send a link of article which is easy to understand/provide a piece of code here. It would be great for me. Thanks

    C# database security regex announcement

  • Compare Validators - Date Problem
    J just4ulove7

    How to do that? Also let me know ... If I have specified a setting in web.config for culture, Is it possible to specify another date format in a particular control. I tried doing this but it throws an error. Like I have specified "dd/MM/yyyy" in web.config. I want a particular dateformat in a variable to be in MM/dd/yyyy format, so i just used .ToString("MM/dd/yyyy",new CultureInfo("en-GB")) but it gave an error... Just wanted to know this... Thanks...

    ASP.NET help tutorial question

  • Compare Validators - Date Problem
    J just4ulove7

    Thanks a lot. It worked out... I found another option too To put culture="en-GB" uiCulture="en-GB" in Web.config, Globalization section. Thanks

    ASP.NET help tutorial question

  • Compare Validators - Date Problem
    J just4ulove7

    Sorry didnt get u. Where should I code for Thread.CurrentCulture? Thanks

    ASP.NET help tutorial question

  • Compare Validators - Date Problem
    J just4ulove7

    Hi,, I am using Compare validators to compare two dates. One of them is as below. Now I need to enter dates in dd/MM/yyyy format. But the Compare validator takes the default date format as MM/dd/yyyy. So if I have two dates as 5/7/2005 2/8/2005 the above date proves to be greater than the below date, as it compares mm/dd/yyyy format, and my validation gets wrong. Can anyone tell me how to change the Datechecking format of the validator? Or any other options... Thanks

    ASP.NET help tutorial question

  • PostBack through Javascript :((
    J just4ulove7

    Hi, Can anyone tell me how to postback a parent form from a child form through javascript? Thanks

    ASP.NET javascript tutorial question

  • Problem with Date formatting
    J just4ulove7

    this is how i write in aspx page (sorry ... its in a td, not in a label) <%=FromDate%> to <%=ToDate%> Thanks

    ASP.NET debugging help question

  • Problem with Date formatting
    J just4ulove7

    Hi, This is a code to get the starting and ending week dates. i.e week starting from Monday - Sunday. I want the dates in dd/MM/yyyy format. When I debug the code, it shows me the date in strFromdate and strTodate in dd/MM/yyyy format. But when it writes to the label in the aspx page it shows in the format MM/dd/yyyy hh:mm:ss format. Can anyone let me know where i m going wrong...??? DateTime dtNow = DateTime.Parse(DateTime.Today.ToString("MM/dd/yyyy")); int ToDayNumber = DayOfWeekNumber(dtNow.DayOfWeek); FromDate= dtNow.AddDays(1 - ToDayNumber); ToDate=dtNow.AddDays(7 - ToDayNumber); string strFromDate = FromDate.ToString("dd/MM/yyyy",new CultureInfo("en-GB")); string strToDate = ToDate.ToString("dd/MM/yyyy",new CultureInfo("en-GB")); Thanks

    ASP.NET debugging help question

  • Simple question on Validation Summary Control
    J just4ulove7

    Thanks a lot

    ASP.NET question help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups