Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










Change Or Remove HttpRequest Input Arguments In HttpModule


Is it possible to change or remove http request form inputs in an httpmodule? My goal is to create a security IHttpmodule that will check the request for reasonable values, such as limits on acceptable input and query parameter length, or use the AntiXSS Sanitizer to remove threats, log potential hack attempts, etc. before a request is passed on to a processor.

Because this is a cross cutting concern I'd prefer to find a solution that applies to all requests and affects all ways request values could be accessed, Reqest.Form, Action(model), Action(FormCollection), HttpContext.Current.Request.Form, etc. I'm using MVC and have considered creating custom model binders to clean the data before creating the model instance. But that would be application specific, require remembering to register every model binder and only apply to Action(model).


View 1 Replies (Posted: Jan 17 at 18:24)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Unit Testing - Mocking HttpRequest In .NET 4.0 / HttpRequest Is Sealed With No Interface
I'm writing unit tests in ASP.NET 4.0 web application (ASP.NET Forms, not MVC). There are several spots in the code where I call the ServerVariables collection to call variables like REMOTE_ADDR. Since my unit tests do not actually initiate HttpRequests when executing my code, things like ServerVariables are Null and therefore error when I try to call HttpContext.Current.Request.ServerVariables("REMOTE_ADDR")

All the solutions I've found to address this issue refer to MVC and so they assume that HttpRequest derives from HttpRequestBase, which it does in MVC but not in ASP.NET Forms.I tried using Moq but you can't mock a sealed class, and HttpRequest is unfortunately sealed with no interface.

Posted: Jul 15 10 at 23:48

View 1 Replies!   View Related
HttpHandlers / Modules :: Change Datetime Of Webrequest / Thread By HttpModule
I'm currently developping a framework to use with Microsoft CRM, MOSS and other softwares like this (which involves some httpModules). I need to do something to change the current date and time so that everything created within CRM or MOSS is marked as created on the date I specified, and not the system date and time. This feature si needed to "time-test" our applications built on top of CRM and MOSS. The problem with CRM and MOSS is that I don't have the power to specify the date and time at the creation of every row in the database, these values are read-only as the CRM gets it by itself (current system date/time). I tried different ways to find a solution but I didn't find anything really encouraging. My last idea was to find a way (is there really a way ?) to change the current date and time only for the thread or the application domain.

Posted: Jan 17, 2009 03:12 PM

View 3 Replies!   View Related
ASP.NET: What Does HttpModule Do - System.ServiceModel.Activation.HttpModule
the purpose of this HttpModule? It's showing up on my HttpModuleCollection list, but I don't know what's it's for.System.ServiceModel.Activation.HttpModule

Posted: May 31 10 at 8:59

View 3 Replies!   View Related
Remove Literals From Input Mask After Form Submit?
I'm using Josh Bush's MaskedInput plugin for jQuery in an ASP.NET 3.5 Webform app. How to get rid from the literals in the code-behind file after form submit? E.g: a phone input with the mask $("#txtPhone").mask("(99)9999-9999");

In the code-behind:

string customerPhone = txtPhone.Text
Which returns me: (12)3456-7890
But this is what I want: 1234567890

In the plugins changelog page it says I can use mask() method with no arguments to archieve this. But how to do it from the code-behind?!

EDIT

I want to send to the server the unmasked value. How to do that?

Posted: Aug 20 10 at 20:02

View 3 Replies!   View Related
Remove Or Change Metatags In Masterpage
I have a masterpage and I wrote metatags in masterpage.master.cs. In the category page which is generated from the masterpage every category has their own metatags. When the user visits category.aspx I want to change the metatags. All metatags are dynamically created and they don't have an id or runat because I create them dynamically with a for loop (reading data from the db). So I can't change title of the page and metatags. How can I do this?

Posted: Aug 6 10 at 13:59

View 4 Replies!   View Related
Web Forms :: How To Change Input Format
I have a matadataclass which I use to show my table individually. No I have the problem that I want to have a kind of input format for my date field like: yyyy/MM/dd and not the german format I'm using on my SQL Server. I already learned from the video that I have to change the display format to show it on my main page. I want to see the two " / " as akind of mask. Sorry for my bad english.

[DisplayFormat(DataFormatString="{0:yyyy-MM-dd}")]
[DisplayName("Delivery Date:")]
public object deliveryDate { get; set; }

Maybe I need a kind of "input validation"? I need the same for my IP field. I have a IP field to add the IP address of a system into my inventory database there I want to have the 3 dots xxx. xxx . xxx . xxx and the range per tree letters from 0-255.

[ColumnOrder(190)]
[DisplayName("Production IP Address:")]
public object IP1 { get; set; }

Posted: Feb 09, 2010 03:38 PM

View 3 Replies!   View Related
Change Keyboard Input In Asp Web Application
i want to change keyboard input in asp.net web application i.e for some text field input should be arabic and for some text field input should be english

Posted: Mar 16, 2008 05:04 PM

View 4 Replies!   View Related
Change The Style Of An Input Box In IE7 On Focus?
I've read posts here and on Google telling me I need to set the style by hand onfocus() and onblur(). However, everything I try isn't working!

Here is my jQuery

$(document).ready(function(){
if (jQuery.browser.msie === true) {
$("input.date-picker").each(function(i)
{
var $foo= $(this);
$foo.bind('onfocus onblur', function() {
$(this).toggleClass('smalltxt-active');
});
});
}//end if
});


The a corresponding box

<input name="ctl00$SelectionContent$Selections1$txtDestinationDate" type="text"
id="ctl00_SelectionContent_Selections1_txtDestinationDate" class="date-picker"
style="width:80px;" />

I have already confirmed that my code is detecting MSIE. That I am getting a count of 2 input.date-picker objects.

Posted: May 31 10 at 6:11

View 2 Replies!   View Related
C# - Change Hidden Input With OnFocus Between UserControls?
This is probably embarrassingly easy, but I've having problems getting this to work.

On ResidentAddress.aspx, I have 2 user controls (AppName.ascx and NavButtons.ascx). When a textbox in AppName.ascx has focus, I want to update a hidden input field on NavButtons.ascx with the value of "TRUE". In the codebehind page for NavButtons, I want to see what the value of this hidden input filed is.

This is what I have so far:

NavButtons.ascx
<input type="hidden" id="IpChangeFlag" name="ChangeFlag" runat="server" value="FALSE" />
AppName.ascx
<asp:TextBox ID="txtFirstName" runat="server" onFocus="document.getElementsByName('ChangeFlag').value='TRUE';">
NavButtons.ascx.vb
If IpChangeMade.Value.Trim.ToUpper = "TRUE" Then
MyValue = true
End If

I am unable to change the value of ipChangeFlad. It always has the value of FALSE.

Posted: Feb 15 at 21:43

View 1 Replies!   View Related
C# - Change Input Language For Selected Controls
I've a text area in my application. I want to programatically set the input language for the text area alone without affecting other controls.

Posted: May 29 10 at 7:47

View 1 Replies!   View Related
Jquery - Trying To Change An Input Mask For Textbox ?
I'm trying change an input mask for textbox when the the check box has been check or unckecked but the problem that always is picking up the else condation only even the check box it is check or not.

here is my code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Imam.Master" AutoEventWireup="true"
CodeBehind="WebForm4.aspx.cs" Inherits="Imam_Contacts.WebForm4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> [code]...

Posted: Feb 28 10 at 4:52

View 3 Replies!   View Related
MVC :: Change Error For Invalid Type Input On Field
I'm using Data Annotations and Metadata attributes in my models to do automatic validations on my forms. Any who, I've got a problem where I have an int field I need to change the error when a letter is entered. Im guetting the default error: "The value 'A' is not valid for Número.". But since this is a spanish web, i need to change the error to something in spansih. Any who, I cant find where to change the ErrorMessage="" to what I need.

Posted: Aug 13, 2010 03:55 PM

View 11 Replies!   View Related
Forms Data Controls :: Remove Text Fill After Change
I have a textboxes which I need to have a value of zero unless it is changed by the person filling out the form. So I have done this: In the page load

[Code]....

which makes the textboxes zero when the page loads. The problem is that when the form is inserted to the database it is not populating the field with a changed amount, but making it zero. I need to somehow tell it to ignore the zero fill command from the pageload. I think I have to use OnTextChange but am not sure how. This is what I have tried

[Code]....

What to make the "" I think is the problem

Posted: Mar 27, 2011 09:46 AM

View 10 Replies!   View Related
.NET HttpRequest From 1.1 To 3.5?
We have to ASP.NET applications, one in 1.1 and one in 3.5. In order to log our errors in the same location we are going to create a WebService that the 1.1 app can call. If I include an HttpRequest as one of the parameters to the webservice, will there be a versioning problem?

Posted: Jan 12 10 at 21:11

View 1 Replies!   View Related
AJAX :: Calendar Extender Not Able To Input Date And Time - Automatically Change To 1901
I have to fill a date 00010101 into the text box on page load.But after loading it automatically change to 19010101 Min year is not 0001 How can i input 0001 as year

[Code]....

Posted: Jan 10, 2011 12:36 PM

View 4 Replies!   View Related
MVC :: Routing Using HttpRequest.Url?
I have an interesting request from my team that I am trying to get my head around. Hoping some of you might be able to point me in the right direction as I'm not too up to speed yet on MVC.

In short - our company has multiple domain names that point to our company web site (i.e. producta.com and productb.com both point to company.com). The question is, how can I route the incoming request for each particular site to a specific view? Specifically what I'd like to do is have the URL be a parameter that can be passed to an action method, which redirect to the view page with that product ID passed as a paramter.. I presume that I should start my investigation using custom routes. But I am unclear as to how I would detect the incoming URL and reroute appropriately. A "pie in the sky" situation would be to have the URL's stored in a datastore that could be queried which would hold the paramater to redirect the controller to.

Posted: Jul 21, 2009 06:33 PM

View 4 Replies!   View Related
How To Get Host Name Without Using HttpRequest
I'm want to run a "background job" in my ASP.NET application (periodically, as separate thread). And I need host name (DNS name or IP) to do my tasks. The problem - HttpContext.Current may be not available here (it's NULL).

Is there any way to get a host name in not using HttpContext.Current.Request.Url.Host.

Posted: Jan 29 10 at 18:38

View 3 Replies!   View Related
C# - How To Queries Are Sent Back In An HttpRequest
I'm going to try to use the WebClient object in .NET to grab the response querystring values sent back by the resource.

I'm familiar with grabbing xml, json, etc. but typically I haven't worked with many NVP type of APIs in terms of grabbing the query immediately from an response sent back from a resource server-side. So how is a query sent back, in the body of a response, header, what? How do you grab it, with the stream object just like you do anything else? This questions relates to the environment I work in C# but really it relates to the web as a whole as well which is why I tagged this in multiple categories as a Request/Response is not MS specific however I am also at the same time trying to utilize the .NET WebClient object.

Posted: Aug 11 10 at 19:52

View 1 Replies!   View Related
Jquery - Get HttpRequest With A Web Method?
I have a page web method, and I need to get access to the headers, and particularly the uploaded files. Is this possible? Can a web method receive a file?If not, what would you recommend to upload files without post back? I am using the jQuery forms library that has support for this (and I have had it working with Django), however, I am having a hard time finding answers on how to do this with ASP.NET.

Posted: Oct 1 10 at 22:01

View 2 Replies!   View Related
Populating HttpRequest.Browser Properties?
I'm  creating HttpContext "by hands" (see [URL]. Does somebody know how can I populate HttpRequest.Browser class's properties (the HttpRequest.Browser.Browser one)? Unfortunately, the HttpBrowserCapabilities class has no the appropriate setter and adding the corresponding http header to the request gives no result.

Posted: Jan 07, 2010 06:40 PM

View 1 Replies!   View Related
C# - HTTPRequest.Files.Count Never Equals Zero?
I have a form on an HTML page that a user needs to use to upload a file which posts to an ASPX page. In the code behind, I want to test if a file has actually been loaded.

if (Request.Files.Count > 0)
{
DoStuff(Request.Files[0]);
}
else
{
throw new Exception("A CSV file must be selected for upload.");
}

I am never getting to the else. Is this just how ASP.NET operates? If I have a input element of type file, is it always going to upload a "file" even if one is not selected? What's the proper way to do this? Maybe this?

if (Request.Files.Count > 0 && Request.Files[0].ContentLength > 0)
{
DoStuff(Request.Files[0]);
}
else
{
throw new Exception("A CSV file must be selected for upload.");
}

Posted: Dec 10 10 at 18:02

View 3 Replies!   View Related
Vb - HttpRequest Maximum Length Exceeded In ASP
I'm trying to fix an issue with an application I'm supporting (I didn't write the code). The code takes an SSRS report and renders it in pdf format. Users are sporadically getting the error indicated in the title. There is no rhyme or reason to when the error is generated (a particular report will run one time and throw the error the next). The code is below.

Public Sub OpenReport()
Dim MyParms As New Generic.List(Of ReportParameter)
Dim mimeType As String = Nothing
Dim encoding As String = Nothing
Dim extension As String = Nothing
Dim deviceInfo As String = Nothing
Dim streamids() As String = Nothing
Dim warnings As Microsoft.Reporting.WebForms.Warning() = Nothing
Dim bytes() As Byte
Dim format As String = "PDF" ''#to open the report in pdf; report viewer invisible
Try
If dropReports.SelectedItem.Value = "1" Then
If Session("IsBDAP") = True Then
MyParms.Add(New ReportParameter("SCAId", dropSCA.SelectedItem.Value, False))
Else
MyParms.Add(New ReportParameter("SCAId", Server.UrlEncode(Session("SCAId")), False))
End If
MyParms.Add(New ReportParameter("ProviderId", dropProvider.SelectedItem.Value, False))
If dropVisit.Visible = True Then
MyParms.Add(New ReportParameter("VisitId", dropVisit.SelectedItem.Value, False))
End If
MyParms.Add(New ReportParameter("FY", dropContractFY.SelectedItem.Value, False))
ReportViewer1.ProcessingMode = ProcessingMode.Remote
ReportViewer1.ServerReport.ReportServerUrl = New Uri(System.Configuration.ConfigurationManager.AppSettings("ReportServerURI"))
ReportViewer1.ServerReport.ReportPath = Session("ReportsFolder") & "MReport"
ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()
ReportViewer1.ServerReport.SetParameters(MyParms)
''#Code to convert the report to pdf
deviceInfo = "<DeviceInfo>" + "<SimplePageHeaders>True</SimplePageHeaders>" + "</DeviceInfo>"
bytes = ReportViewer1.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)
Dim size As Integer = bytes.Length
ReportViewer1.ServerReport.Refresh()
Response.Buffer = True
Response.Clear()
Response.ContentType = mimeType
Response.AddHeader("content-disposition", "attachment; filename=MReport." + extension)
Response.BinaryWrite(bytes)
ElseIf dropReports.SelectedItem.Value = "2" Then
If Session("IsBDAP") = True Then
MyParms.Add(New ReportParameter("SCAId", dropSCA.SelectedItem.Value, False))
Else
MyParms.Add(New ReportParameter("SCAId", Server.UrlEncode(Session("SCAId")), False))
End If
MyParms.Add(New ReportParameter("ProviderId", dropProvider.SelectedItem.Value, False))
If dropVisit.Visible = True Then
MyParms.Add(New ReportParameter("FollowUpVisitId", dropVisit.SelectedItem.Value, False))
End If
MyParms.Add(New ReportParameter("FY", dropContractFY.SelectedItem.Value, False))
ReportViewer1.ProcessingMode = ProcessingMode.Remote
ReportViewer1.ServerReport.ReportServerUrl = New Uri(System.Configuration.ConfigurationManager.AppSettings("ReportServerURI"))
ReportViewer1.ServerReport.ReportPath = Session("ReportsFolder") & "FReport"
ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()
ReportViewer1.ServerReport.SetParameters(MyParms)
''#Code to convert the report to pdf
deviceInfo = "<DeviceInfo>" + "<SimplePageHeaders>True</SimplePageHeaders>" + "</DeviceInfo>"
bytes = ReportViewer1.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)
ReportViewer1.ServerReport.Refresh()
Response.Buffer = True
Response.Clear()
Response.ContentType = mimeType
Response.AddHeader("content-disposition", "attachment; filename=FReport." + extension)
Response.BinaryWrite(bytes)

I read that the default length limit is 4MB. None of the reports by themselves are even over 350K. I'm wondering if this could be caused by a caching issue. I'm not an expert, so I need some guidance as to how best to solve the problem. I also want to understand why the issue is happening. note that only 2 reports are shown in the snippet - there are about 30+ reports in the full sub. edit - I tried the proposed solution, but it didn't help (I also tried the Fiddler route, but did not see anything glaring). I thought it might be best to clarify. The reports will run fine for a while, but the execution time gradually gets slower and slower until the application eventually displays the error.

Posted: May 18 10 at 18:11

View 3 Replies!   View Related
Difference Between HttpMethod And RequestType Of HttpRequest?
The HttpRequest class defines two properties:

HttpMethod:

Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client.
public string HttpMethod { get; }
The HTTP data transfer method used by the client.

and RequestType:

Gets or sets the HTTP data transfer method (GET or POST) used by the client. public string RequestType { get; set; } A string representing the HTTP invocation type sent by the client.What is the difference between these two properties? When would i want to use one over the other? Which is the proper one to inspect to see what data transfer method was used by the client?The documentation indicates that HttpMethod will return whatever verb was used: such as GET, POST, or HEAD while the documentation on RequestType seems to indicate only one of two possible values: i test with a random sampling of verbs, and both properties seem to support all verbs, and both return the same values:

Testing:

Client Used HttpMethod RequestType
GET GET GET
POST POST POST
HEAD HEAD HEAD
CONNECT CONNECT CONNECT
MKCOL MKCOL MKCOL
PUT PUT PUT
FOOTEST FOOTEST FOOTEST

What is the difference between:

HttpRequest.HttpMethod
HttpRequest.RequestType

and when should i use one over the other? Keywords: iis asp.net http httprequest httphandler

Posted: Jan 28 10 at 18:18

View 2 Replies!   View Related
Get The Raw Response Header And Body From The HttpRequest?
Is there a way to get the raw response header and body from the HttpRequest.Response object for debugging when issues arrise?

Posted: Feb 18, 2010 01:17 PM

View 4 Replies!   View Related
MVC :: Get The Object Of HTTPRequest - Logon User Details
Anyway I can get the object of HTTPRequest? From View or Action? What I want is to read the logon user name and its email address from active directory.

Posted: Aug 17, 2010 01:46 AM

View 1 Replies!   View Related
Web Forms :: HttpRequest.IsAuthenticated And Form Authentication?
I implement form authentication mechanism on my site, so I renew session id (by abandoning session state obj & cleaning session cookie),

when user enters login page. Well... actually, aside other things, I renew session id if user "is not authenticated".

How can I check that user is authenticated? I can use HttpRequest.IsAuthenticated , which will check authentication cookie. So there are questions pop up.

1. I dont know exactly when HttpRequest.IsAuthenticated gets "true". It looks like it sets to true, when server gets authentication cookie from browser. I am talking about only form authentication and UseCookies mode.

2. Anyway, I can check cookie collection and gets authentication cookie from it. Suppose I get it. Do I need to decrypt and check the ticket values to compare session ids in code, to make sure that I have the right ticket 0_o ? do I need then store session id inside authentication cookie? or

does FormsAuthenticationModule do it all for me, and it is sufficient to check HttpRequest.IsAuthenticated?

Posted: Oct 28, 2009 07:40 PM

View 6 Replies!   View Related
WCF / ASMX :: How To Capture SOAP Fault With HttpRequest
I use HttpRequest, when there is a SOAP fault, I get 500 error. I read that you can get the SOAP fault info in the response stream, but when there is a 500 error, how do you get the response stream? 

Posted: Jun 03, 2010 08:40 PM

View 1 Replies!   View Related
Mvc Rhino Mocks Mocking Httprequest Values?
here Im trying to write a test can I mock a HttpRequestBase to return post values like this? please help as its quite urgent, how can I acheive this?

var collection = new NameValueCollection();
collection.Add("Id", "1");
collection.Add("UserName", "");

[code]...

Posted: Jul 7 10 at 14:43

View 1 Replies!   View Related
Web Forms :: How To Extract A Portion Of A String That Is Returned From A HTTPRequest
im writing a whois lookup page for a clients website and the whois query for .com .biz etc is handled by internic,

i create a HTTPRequest and get the response and it returns a whole webpage with the doctype, head tags and body tags, all i want is the data between the tags <pre> and </pre> how would i get just this from the string that is returned?

Posted: Jan 19, 2010 04:34 PM

View 3 Replies!   View Related
HttpHandlers / Modules :: How To Found A Very Strange Glitch With HttpRequest.Params Collection In .Net 2.0
I've found a very strange glitch with HttpRequest.Params collection in .Net 2.0.

I was investigating an error reported by our production servers. The error was triggered by requests from mobile clients having browser called "UP.Link".

In order to reproduce the error with minimum of code:

1. Create an ASP.Net  Web Application project in VS.

2. Add a custom HttpHandler factory class to your project:

[Code]....

3. Register your handler factory in the web.config file:

<httpHandlers>  <add path="*" verb="*" type="UPBrowser.MyHandlerFactory, UPBrowser"/></httpHandlers>

4. Add an empty page called Home.aspx to your web project.

5. Go to Properties page of your web project in VS and set Web->Start Action->Specific Page to  "Home.aspx?par1=val1" .

6. Run the application from VS. You will see a blank Home.aspx page in the browser, which is what you expected - no error.

7. Now imitate request from a device whose USER_AGENT header starts with "UP". Instructions on how to change User Agent in Frefox can be found here:

http://johnbokma.com/mexit/2004/04/24/changinguseragent.html

Set general.useragent.override to "UP"

8. Result:

HttpRequest throws NullReference exception on the first attempt to access Params collection.

Stack trace:

[NullReferenceException: Object reference not set to an instance of an object.]   System.Web.HttpRequest.FillInParamsCollection() +84   System.Web.HttpRequest.GetParams() +81   System.Web.HttpRequest.get_Params() +50   UPBrowser.HandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) in C:ProjectsUPBrowserHandlerFactory.cs:22   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +540   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +215   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +194
A few things to note:1. The error is only reproducible when HTTP request has a query string.2. HttpRequest.Params property returns combined collection of QueryString, Form, ServerVariables and Cookies. This combined collection is lazy-initialized by HttpHandler code on the first call. So, don't try to reproduce this error from within traditional ASP.net page code - by the time the Page code is called, all collections are already initialized. It has to be from a Handler factory. (I haven't tried to reproduce this from HttpHandler code yet)3. Exception occures on the first call to Params ONLY. Subsequent calls will not throw an exception. So, this horrible code always works:

[Code]....

Is this a known bug in Asp.Net? .Net request parsing code is sensitive to HTTP headers content?

Posted: Aug 15, 2009 02:11 AM

View 5 Replies!   View Related
Change "Browse" Text Input Type = File
Regarding the HTML tag <input type="file" ... it always displays text "Browse".  My client is not happy with this.  The goal is to provide users with a SaveAs functionality of only the PDF in an iframe.  I have done alot of research into this matter.  I have looked at the Acrobat.dll, considered Window.Forms, and most recently the somewhat contrived solution to set a parent <input to the background and place a more meaningful gif on top of it.

In general, my client wants to see SaveAs functionlity that will separately launch a familiar SaveAs dialogue box with no apparent record within the ASP page that the client's path had been gathered or read from a page. I really need to guidance here.   

Posted: May 27, 2009 03:35 PM

View 3 Replies!   View Related
Forms Data Controls :: Change The Column Name - "Remove First Character And After 3rd Character Insert Colon
My issue is that , need to change the column name(following format "Remove first character and after 3rd character insert colon")  of the gridview (which is binded with XMLTextReader). Without changing directly XML file, Required to change the column name dynamically at runtime .

Performance.xml

<Performance>
<Departments>
<Heading>FS</Heading>            
<S0015>1</S0015>
<S0020>2</S0020>         
<S0025>5</S0025>
<S0030>5</S0030>
<S0035>6</S0035>
</Departments>
<Departments>
<Heading>BS</Heading>
<S0015>0</S0015>
<S0020>3</S0020>
<S0025>5</S0025>
<S0030>1</S0030>
<S0035>3</S0035>
</Departments>
</Performance>

Heading                S0015           S0020         S0025        S0030      S0035 
FS                        1                    2                   4                5              6
BS                        0                    3                   5                1              3         
Required Format:  Remove first character and after 3rd character insert colon (S0015 --  00:15)

Heading                00:15           00:20         00:25         00:30        00:35    
FS                        1                    2                   4                5              6
BS                        0                    3                   5                1              3  

Posted: Jan 14, 2011 09:48 AM

View 2 Replies!   View Related
MVC :: Add Textbox And Change ActionLink To Use Textbox Input?
How do I add a textbox for user input in the view and then change the link below to user the user input instead of the hard coded ID?

<%= Html.ActionLink("click me", "Index", new { id = 10057 } ) %>

Posted: Oct 05, 2010 03:08 PM

View 3 Replies!   View Related
Web Forms :: How To Generate Rtf File Based On Input Field (textbox Input By User) C#
how can i generate rtf file based on input field(textbox input by user) c# 

Posted: May 27, 2010 03:46 AM

View 3 Replies!   View Related
C# - Is There A Security Reason To Validate A Textbox Input If You Are Limiting The Max Length Of The Input
Since I'm new to coding and I'm trying to understand why here is a little more detail on the question.If you have a text box and you are limiting the input to say 2 charactrs do you really need to validate the input further? What I have is a text box that has a max length of 2. Is there a security reason to add a validator to the textbox. I should add this is in Asp.net.

Posted: Oct 1 10 at 15:37

View 8 Replies!   View Related
Forms Data Controls :: Dropdownlist Shows Items For Second Input As Well As First Input?
I m using a dropdownlist from sqldatasource based on input from listbox like this-

[Code]....

It works very much fine when i select listitem from listbox first time. But when i select listitem from listbox second time, my dropdownlist shows items for second input as well as first input.dropdown should not show items based on first input when i populate it second time.

Posted: Nov 11, 2010 03:38 AM

View 4 Replies!   View Related
C# - Override Error Message (The Value 'xxx' Is Not Valid For Age) When Input Incorrect Data Type For Input Field .net Mvc
I've tried to override error message when input incorrect data type in input field on HTML form.For example I have the model like this.

public class Person
{
public string FirstName {get;set;}
public int Age {get;set;}
}

For view, I put text input for Age to get it value.When type some string in Age text box like 'test' and press submit button.
I got this error message ,The value 'xxx' is not valid for AgeHowever, I want to change this message and try many way. There 's nothing effect this message value.

Posted: Aug 24 10 at 12:43

View 1 Replies!   View Related
VB.NET Web Application Input Box / Input Box That Comes Up When A User Clicks 'Find' Button?
I would like to program an Input Box that comes up when a user clicks 'Find' button.  It asks 'Please enter an employee number'.  Then it takes the employee number typed into a text box and searches a dataset for that specific employee record.

I know that it should be server side because the client may not have the proper javascript installed or diabled.  Therefore, can someone give me some code to put in code behind that can pop up an input box and use the input after, if this can be done? 

Posted: Aug 04, 2010 06:33 PM

View 1 Replies!   View Related
Web Forms :: How To Change Old Menus (Manual Input In Master Page) To Sitemap Menus Using Menu Control With Sitemap DataSource
I was force to change my old menus (Manual input in Master Page) to Sitemap Menus using Menu control with Sitemap DataSource.

I have this:

Made by this code:

[Code]....

How can i convert to this style?

Posted: Oct 05, 2009 11:27 PM

View 1 Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved