I'm making a website in ASP.NET 4.0 where I make use of the RequiredFieldValidator control to validate a wizardstep.It works perfectly with Javascript enabled, but when I turn it off (in my Firefox) it just goes to the next step.We don't do a Page.IsValid check, but we don't do much on the "next button clicked" event either.Certainly not something that is forcing it to go to the next step.
i have webForm which have aspxMenu as toolbar.my problem is that when user click on aspxMenuItem, my requiredFieldValidator doesn't work, but when i use simple button instead of aspxMenu, it works!
I am using c# 2.0 and ASP.NET. I have a button in my web page. I want to enable the button only for the last 5 working days of any month. How to enable the button only for the last 5 working days(business days) that is Monday to Friday.
I have CheckedListbox and grid. Based on what are the items checked in listbox that much of items need to be shown in grid. My SQL procedure like ; select * from Emp where city in (@Names)
Everything is ok if I am checked any of the item and click OK. If I am nothing checked from the listbox I need to display all of the cities from DB. I need to do this work without modifying my procedure. So need to work out in front/end. If I pass nothing from the code the query seemed as select * from Emp where city in ('') So no records getting...
I want to create new string or stringbuilder based on condition; Example . I am updating a count variable "i"; if i = 100, i need to create a string or stringbuilder; if else i = 200 i need to create a new string or stringbuilder; if else i = 300 i need to create a new string or stringbuilder; and so on how i can achive this?
I´m using some code I found on how to send files to a FTP address. It´s having a Public sub. Within there is there is a credentials set. I need to set different credentials based on which button was clicked. Somthing like:
Public Sub uploadFileUsingFTP(ByVal CompleteFTPPath As String, ByVal CompleteLocalPath As String, Optional ByVal UName As String = "", Optional ByVal PWD As String = "") If Button1.Click Then reqObj.Credentials = New NetworkCredential("User1", "PASS") elseif Anotherbbutton.Click then reqObj.Credentials = New NetworkCredential("User2", "PASS") End If
I want to call javascript confirm function in .aspx.cs page .. I have done it by using RegisterStartUpScript javascript code:
 <html><head runat="server"><script type="text/javascript" language="javascript"> function alertMe() {   //alert("Hello"); if(confirm("File with this Name Already Exists, Do you want to Replace it ?")) { return true;   } else {   return false;      } }   </script>   </head>   </html>
.aspx.cs code on button click based on some condition:
I have one asp.net gridivew where i have written some code and bind it.. itz working fine now my requirment is when ever any gridview row which conatin column 3rd zero(0) i want to hide tht row ..
I want to hide the link button if the status (value 1 or 0) of the form is set to 1. Here is the code I am trying to use.
Protected Sub gv1_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then 'get the cell cell value Dim status As Integer
[code]....
I think my mistake lies in getting the status value (as it ouputs 0 for every application).
i m displaying an image in gridview based on condition from sql table. That is if the colum named "availabillity" is A the image will be red n if the value is "NA" the image will be green. i am using RowDataBound event.
but i am getting error as "Cannot implicitly convert type 'System.Web.UI.WebControls.DataControlRowType' to 'bool'".
I have a stored procedure which is returning me several rows. I am presenting the rows as item in a repeater. I need to move one of the rows down to the footer template, based on a condition. For instance, if my stored proc is returning a column called A, I need to drop this record to the footer item, if the A column value is Total. I have no idea how to do that.
I have a tab container with 10 tabs each with unique id on a hyperlink click i need to make some tabs visible true false,in hyperlink I am passing a query string param
if the param="Y" param = Request.QueryString["type"]; if  (param == "Y") { for (int tc = 0; tc <= TabContainer1.Tabs.Count - 1; tc++) { if (TabContainer1.Tabs[tc].ID == "Y") { TabContainer1.Tabs[tc].Visible = true;              } else {                TabContainer1.Tabs[tc].Visible = false: } } }
I have the above condition but on this click the tab container is not at all visible but without any parameter passing the tab container is visible.
I have a function or binding grid where i pass the flag for query to be displayed for page load i have below query
if (flag=="pageload){sql= "select "; sql= sql * " from (select top 50  * " from ";   sql= sql+ "(select top 50 *  from EMPLOYEE order by NAME )"; sql= sql+ " as T1 order by T1.NAME DESC) as T2 order by NAME ASC "; } else if flag=="filteration select * from EMPLOYEE
In the above query i get 50 records per page & the next prev navigation works fine but when i filter out the records i cant use the above query to get the filtered records as I need to filter from the whole recordset say I have total 1000 records after filtering i get 500 records after filtration i am not able to navigate across the records correctly...
in a posyback button click event i get the status(condition ) from database by executin query as said earlier currently i have this controls visible true/ false on server side code in posyback button click event after getting the condition but as suggested by u as it takes longer time on server side to makes controls visible true false to do it on client side so in posyback button click event i assigned a hidden control with the condition value now i want to pass this value to client side script so that i can toggel the visiblity depending on hidden control value from posyback button click event i am activating the setype function in client side which has the code as mentioned...wht i need is pass the hidden value to clinet side & make & position the controls on client side.
I have dropdown and textbox, I want to pass dropdown value as condition in generic handler through jquery autocomplete I am using generic handler for getting values from database.
I want to write a LINQ to Entity query which does order by ascending or descending based on input parameter, Is there any way for that. Following is the my code.
public List<Hosters_HostingProviderDetail> GetPendingApproval(SortOrder sortOrder) { List<Hosters_HostingProviderDetail> returnList = new List<Hosters_HostingProviderDetail>(); int pendingStateId = Convert.ToInt32(State.Pending); //If the sort order is ascending if (sortOrder == SortOrder.ASC) { var hosters = from e in context.Hosters_HostingProviderDetail where e.ActiveStatusID == pendingStateId orderby e.HostingProviderName ascending select e; returnList = hosters.ToList<Hosters_HostingProviderDetail>(); return returnList; } else { var hosters = from e in context.Hosters_HostingProviderDetail where e.StateID == pendingStateId orderby e.HostingProviderName descending select e; returnList = hosters.ToList<Hosters_HostingProviderDetail>(); return returnList; } }
I have four textbox fields for ItemName, ItemDescription, Length and Quantity.
One radiobuttonlist and its listitems are FixedLength and Random Length.
One button field called Submit and one gridview.
In the GridView I have 4 bound columns and 1 template column such as ItemName, ItemDescription, Length, Quantity and IsFixed_f(flag field). I have added one checkbox in the GridView's Template column for the IsFixed_f field.
After entering all textbox fields, I have to select either one listitem in the radiobuttonlist(FixedLength or RandomLength). After completing these things. If I enter the Submit button, all the values in the textbox to be displayed under the GridView's corresponding column name and checkbox to be checked if FixedLength listitem is selected otherwise the checkbox.checked should be false. How to do this?
I have an asp.net application that uses validation controls on textboxes. However, if the user enters a value in txtFieldA, then I want to disable the validation controls on txtFieldB and txtFieldC.