c# - Browser does not pass the querystring to IIS -



c# - Browser does not pass the querystring to IIS -

i have webpage trying read querystring , calculations based on it. page has viewstate enabled. on postback calls, querystring not passed on iis. server receives default url, though browser display querystring in address bar.

i don't know how proceed this. or code should add together here help figure out problem.

edit:

asp.net button definition

<input class="defaultbuttons" id="btnsave" onclick="return fnsave();" type="submit" value="save" name="btnsave" runat="server" onserverclick="btnsave_serverclick">

page attributes

<%@ page language="c#" codebehind="viewwarrantycontract.aspx.cs" autoeventwireup="true" enableeventvalidation = "false" inherits="fanuc.csms.customersupport.web.viewwarrantycontract" enableviewstate="true" %>

onserverclick function

rowfilter["wrnt_warranty_no"] = request.querystring["wrnt_warranty_no"];

page load function

protected void page_load( object sender, system.eventargs e ) { seek { if ( request.querystring[ "message" ] != null && request.querystring[ "message" ] != "" ) objerrordisplay.messagecode = request.querystring[ "message" ]; string strwarrcommdata = request.querystring[ constants.qs_data_flag ]; if ( strwarrcommdata != null && strwarrcommdata.trim().equals( constants.qs_commission_data ) ) bwarrantyscreen = false; strscreenmode = request.querystring[ constants.session_mode ]; if ( strscreenmode == null ) strscreenmode = constants.screen_mode_modify; if ( strscreenmode == "" ) strscreenmode = constants.screen_mode_modify; hdnscreenmode.value = strscreenmode; applypermissions(); localize(); binddropdowns(); if ( !ispostback && strscreenmode != constants.screen_mode_new ) this.getwarrantycontractdata(); //gets info db if page loaded first time. setcontrolstylebyscreenmode(); //sets command styles depending on screen type based on query string. } grab ( fanucbaseexception fbeex ) { objerrordisplay.errortolog = fbeex; } }

setcontrolstyle method

private void setcontrolstylebyscreenmode() { if ( strscreenmode == constants.screen_mode_new ) this.txtseibannovalue.readonly = false; else this.txtseibannovalue.readonly = true; }

update: apparently querystring comes empty on page load function well. weird thing happens on post back. on first load, querystring object not null.

function loads page first time:

protected void btnmodify_serverclick( object sender, system.eventargs e ) { seek { this.storevaluesinsession(); string strmode = constants.screen_mode_modify; string strurl = "../customersupport/viewwarrantycontract.aspx?" + constants.qs_data_flag + "="; if ( bwarrantyscreen ) strurl += constants.qs_warranty_data; else strurl += constants.qs_commission_data; row[] objcustselected = owc.getrowsobject( new string[]{ "wrnt_warranty_no" }, true ); string strwarrantyno = convert.tostring( objcustselected[ 0 ][ "wrnt_warranty_no" ] ); strurl += "&" + constants.session_mode + "=" + strmode + "&" + "wrnt_warranty_no" + "=" + strwarrantyno; response.redirect( strurl ); } grab ( fanucbaseexception fbeex ) { objerrordisplay.errortolog = fbeex; this.owc.displaygridwithexistingstate = true; } }

c# asp.net iis

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -