Monday, 3 November 2008
|
| ASP.NET app - Slow initial load IIS6 Med 16:33:00 |
| | Hi,
Initial load of my ASP.NET app takes 50 seconds to load. Then it become fairly fast. Followings are my app/hardware configs:
Server/IIS: ----------- IIS 6 running on Hosted VPS Windows 2003 Enterprise, with allocated 512MB RAM. Lots of memory still available when my app runs. CPU usage is low too. Application pool default settings.
ASP.NET: -------- ASP.NET 3.5 using "StateServer" service.
Initially I thought delay was caused by SQL connection, so I created a blank asp.net app, with one page (default.aspx) only. This page does not try to connect to SQL on load. It only does this when a button on default.aspx is clicked which calculates connection time.
When I tried to load default.aspx, it still took more than 50 seconds to load. Considering there is no code to run when this page loads. SQL Connection takes less than 7 millisecond to execute. So SQL connection is not source of the problem.
Does anyone knows possible cause of this delay? I think it is asp.net/IIS related or might have something to do with app pooling or "StateServer" service perhaps?
Thanks for your time.
Kind Regards
Med
|
| | 1 answer | Add comment |
Saturday, 1 November 2008
|
| ASP.Net Frame Work Doug Bynum 15:22:29 |
| | Which O/S has more tools to program in ASP.Net; XP or Vista? -- D.E.B.
|
| | 2 answer | Add comment |
Friday, 31 October 2008
|
| Unexpected Exception. Devin 18:28:31 |
| | Hi, I'm getting an exception error on this line:
do while not rs.eof and ucase(rs.fields("category")) = ucase(holdLast)
This error occurs on the last record in the table (mdb). I deleted the last few records from the table to see if it was something with the record. The same thing occured.
I also response.write the values of rs.fields("category") and holdLast and they output the values I would expect.
Am I going nuts?
I don't want to post my enter page, but if the error could really go beyond this line then please let me know.
Thanks for any input.
DC
|
| | 3 answer | Add comment |
Thursday, 30 October 2008
|
| Creating date-based grid in ASP Mike P 20:03:49 |
| | I need to create a grid which along the y axis has a user name and along the x axis has a date. Somehow I need to populate the x axis with 6 months worth of dates from the current date, and then look at a database table that lists what dates a user is busy on so that I end up with a grid that shows all users and all dates for the next 6 months and when they are busy and when they are not busy.
I have very little experience in ASP so this is proving very tricky, I think the hardest part would be creating the grid with a column for each date for the next 6 months. Can anybody help?
*** Sent via Developersdex http://www.developersdex.com ***
|
| | 2 answer | Add comment |
|
| Consuming .NET Webservice from classic ASP Guest 16:23:35 |
| | I am trying to consuming a .NET web service from a standard (classic) ASP, but having not so much luck as I dont have much experience about SOAP.
Here is the webservice url: http://test.webservices.superbreak.com/SoapEndpoint.asmx
I have been advised that i need to use this through MSSOAP Toolkit or through soap envelope.
Could someone advise about some coding pattern to access this service?
Thanks!
arno
|
| | 2 answer | Add comment |
|
| system.web.httpcontext.current.user.identity.name shows old usenam Antonio O''Neal 15:22:07 |
| | We changed a username in AD. The user now logs on to a computer on our network using the new username without any problems. They can not logon using the old username. However, when they access a IIS 6.0 web site where a programmer compares system.web.httpcontext.current.user.identity.name to a lookup table containing usernames they could not gain access with the new userid. We created a web page to show what system.web.httpcontext.current.user.identity.name is returning. It is returning their old username. If we put the old username in the table the user may access the web site. The IIS site logs for the web site show the new username for the user as he accesses the site. I have used adsiedit to look at the user's information in AD. It shows only the new username through out the the account parameters.
We also have a sharepoint 3.0 site that shows the user's old username when he accesses that site.
What can I do so system.web.httpcontext.current.user.identity.name will contain the new username for this renamed account?
Thank you, Antonio
|
| | Add comment |
Tuesday, 28 October 2008
|
| ASP and HTML templates. Using vCalendar Devin 21:33:17 |
| | Hi.
I'm hoping somebody can give me some quick incite into the confusion I am experiencing. I'm using an open source package called vCalendar. It uses asp and and access database.
I need to add some dynamic content to one of the pages but I can't figure out how. On the HTML page there are fields that generated when the asp file is processed. Always in {variable_name}. If I renamed the html template file to asp and adjust the asp file to point to the renamed file it still works, but it doesn't process the asp in the template file, it just prints it. Maybe this is plain and obvious, but I've never worked with templates before and the references I find to them don't seem to be set up the same way as this one.
I hope thats enough information to go on.
Thanks!!
DC
|
| | 1 answer | Add comment |
|
| If user doesn't have file permission to acceess xyz.asp, redirect
them Devin 16:27:47 |
| | Hi
I asked a similar question a while ago, but I need to clarify what I am doing in order to get clearer response.
When a user attempts to access an asp page, I want to check that they have permission to access it. If they have permission they should be able to coast right into the page with out incident. If they do NOT have file/folder permissions for that page I want to redirect them to another page gracefully. That is to say I don't want them to get the default "forbidden" page or what-have-you.
Thanks!
D
|
| | 5 answers | Add comment |
Monday, 27 October 2008
|
| modalPopupExtender issue Grissom 17:34:51 |
| | I have a modal panel that houses a search function. I am using a linq datasource and visual studio 2008. My gridview is being updated with the correct data when searched but if I attempt to select one of the items in the gridview the code jumps out when trying the retrieve the row of data. The code behind registers that a select has been done and the command argument has the correct number but the rows are null. I fill the linq datasource usnig the Selecting method. Any thoughts would be helpful. -- There are only 10 types of people in this world: Those who understand binary and those who don''t
|
| | 1 answer | Add comment |
|
| ASP - Only allow access via specific IP address Jez 14:20:48 |
| | I'm trying to work this out..
But I'm a little stuck...
<% 'declare variables Dim sIP1 Dim sIP2 Dim sIP3
'assign our APPROVED IP addresses (all extrenal addresses) sIP1 = "xxx.xxx.xxx.xxx" sIP2 = "xxx.xxx.xxx.xxx" sIP3 = "xxx.xxx.xxx.xxx"
'retrieve the visitors IP address sIP = Request.ServerVariables("REMOTE_ADDR")
'check if IP address matches any of the approved IPs response.write sIP If sIP <> sIP1 OR sIP <> sIP2 OR sIP <> sIP3 Then Response.Redirect "http://www.google.com" else response.write "HELLO & WELCOME" End If %>
How do I do the IF statement ?? if sIP is anything other that sIP1 or sIP2 or sIP3 then ??? Thanks
|
| | 1 answer | Add comment |
Saturday, 25 October 2008
|
| Error Question Mangler 01:17:10 |
| | Lets say I have a page where a user can update their profile information. In the DB table the username field has a unique constraint on it to keep username from repeating. If the user changed their username to something that already existed in another record in that table sql will throw an error. That also means that IIS will give an error page.
I was wondering how I can keep the user on the same page but display the SQL error message somewhere on the page.
|
| | 1 answer | Add comment |
Thursday, 23 October 2008
|
| Possible to verify user login? Devin 19:19:30 |
| | Hi,
This might seem a little bit disjointed. My boss is suggesting I take a certain approach to something. There is a private section of the intranet (its essentially its own section as few users would have use for it or even know of its existence) and when a user logs on to the home page of this intranet site ASP should verify that they are allowed to be there (based on them logging on to the network when they logged on to their PC).
I suppose it could be done with folder permissions. I don't really see how else though.
Any suggestions or questions about my question?
D
|
| | 6 answers | Add comment |
|
| COALESCE a Session Var ASP Gtn170777 16:18:00 |
| | Hi All, is this the correct way to Coalesce a session var -
<%Session("EMPLOYETOKENS") = tokens.Fields.Item(COALESCE(SUM("JBCLTokens"),0)).Value%> ?
Thank you
|
| | 1 answer | Add comment |
|
| problem with paste from word into textarea asp MS SQL 2000 Gtn170777 12:11:01 |
| | Hi there,
I'm hoping this is the place to submit this, as really I am looking to resolve the issue before the data is sent to the database.
I have a website, with a textarea, that stores data in an nvarchar(4000) field, the insert is done via a stored procedure. The data is sent as HTML Encoded.
This works fine when data is manually entered, however if the user enters the data by copying and pasting from Word, Notepad, PDF, etc the data is entered ok, but then doesn't display properly.
The problem seems to be the use of the tab key in the associated program, for instance -
The data from word looks like this -
"• To hold a Degree with a significant "
The data held on the database then looks like this -
"• To hold a Degree" Please note the gap between ":" and "To" this doesn't appear to be a space as it is to big.
The data that is then displayed is -
"•aU"
If i manually remove the gap I get the following -
"•To hold a Degree with a significant " with no gap
Obviously i can't manually do this for every entry, and i deally I still want to keep the structure of the text, i.e paragraphs.
I think the problem is around ordered and unordered lists from Word etc, and the tab space between the bullet and first letter, is there anyway to clear both the un/ordered list and tab space before submitting the data?
I'm using MS SQL 2000
My stored procedure looks like this -
CREATE PROCEDURE NormalAdvert @EmployeeId int, @SiteID int, @ClientId INT, @JobTitle nvarchar(50), @Description nvarchar(4000), @Payrate nvarchar(50), @location nvarchar(50), @category nvarchar(50), @employmenttype nvarchar(50), @reference nvarchar(50), @startdate nvarchar(50) AS Declare @NewID INT INSERT INTO dbo.JBAdvert (JBASiteID, JBAEmployeeID, JBAClientID, JBATitle, JBADescription, JBAPayRate, JBALocation, JBACategory, JBAEmplymentType, JBAReference, JBAStartDate) VALUES (@SiteID, @EmployeeId, @ClientId, @JobTitle, @Description, @Payrate, @location, @category, @employmenttype, @reference, @startdate)
Thank you
|
| | 2 answer | Add comment |
Wednesday, 22 October 2008
|
| FedEx Webservice Printing Zebra raw printer file Raymond 23:18:40 |
| | Hi All,
Has any one work with FedEx Webservice with ASP?
I am using ASP via SOAP to talk to FedEx Webservice, I have no problem printing the FedEx label with PNG or PDF, my problem is to print the raw Zebra printer file to the Zebra printer.
I know that the web browser will not be able to do this, I need to create an ActiveX control.
Has any one created any ActiveX control like this?
Ray
|
| | Add comment |
|
| Roles.AddUserToRole(Username, UserRole) in transactions VictorP 17:31:01 |
| | Hi, I'm trying to use inside a transaction scope the method Roles.AddUserToRole(Username, UserRole) but the DTC thows the exception: "The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction. Could not create constraint. See previous errors.".
Outside the TS it works fine. Is there any reason for which that method should not work inside a transaction scope? Also I have noticed that in the same execution context the method
MembershipUser newuser = Membership.CreateUser(Username, Password, Email);
fails or completes successful in a random way. Sometimes works, sometimes the DTC throws again.
These methods were thought to be used inside a TS? Should I use them outside TS ?
|
| | 2 answer | Add comment |
|
| ASP connection to visual foxpro Guest 13:46:35 |
| | I am trying to setup an active server page that accesses my visual foxpro database. I have setup a system DSN named vfp_test. How do you open a recordset in an ASP? I have tried this code: rs.Open "ICILOC", "DSN=VFP_test" , but I get an error on that line.
|
| | 1 answer | Add comment |
Monday, 20 October 2008
|
| Download files from remote server Axelman 22:06:23 |
| | Hi guys,
I'm using Classic ASP, IIS6, IE 7, FF 3
I've developed a vb script to downloand files hosted in my server (zip, doc, pdf, jpg, xls, et. etc.) it's very straight forward and there's a lot of information around the web, however when it comes to dowload files from a remote server (NOT hosted in my server) there is no information , the idea is to have an Access DB that stores the full url i.e.(http://www.downloadallfiles.com/somefolder/manual.zip) then retrieve this url and downlod the file, again I'm able to force the download dialog box but do not know how to achive the actual download from a remote server.
Please your urgent help is appreciated, I've been stuck for 2 weeks on this issue.
Best regards
|
| | 3 answer | Add comment |
|
| Common connection string file Egsdar 21:30:07 |
| | Hi, On ASP 3.0 I was able to create a file conn.vbs where the connection string lines to the db resides in, how can i do the same on ASP.Net?
The reason of this is to avoid modify the line in only one file instead of do it in several web pages.
|
| | 6 answers | Add comment |
Saturday, 18 October 2008
|
| De-Speckle or Remove Noise from an image Daddywhite 23:21:17 |
| | I seem to be able to do this with the TRIAL version of Aurigma Graphics Processor in ASP. However the trial version leaves a horrible square randomly on the image. (Obviously a limitation of the trial version)
They have discontinued this product and therefore cannot purchase it!!
Anyone know of any other ASP Image tools that cos Remove Noise or De- Speckle an Image? I have tried about 8 different ones with no luck!! Or anyone got a licensed version of Aurigma Graphics Processor they can give me?
I am also using Persits ASPJpeg but that doesnt seem to have the ability to do this.
Thanks for your time.
|
| | Add comment |
Friday, 17 October 2008
|
| asp vbscript textbox paste from word problem Gtn170777 02:06:36 |
| | Hi Guys,
It's been a while, I've got a small problem that I could do with your expertise on. As you know (I Think) I build websites for recruitment agencies, part of the website includes a job board facility and for job form entry I used a normal form with a normal textbox, however what I'm finding now is that a lot of recruitment consultants are pasting the job description into the textbox, which when submitted is resulting in most of the text not being entered!!!
Is there any way around this?
I've attached the code -
Thank you
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="../Connections/recruta2.asp" --> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If
' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <% ' IIf implementation Function MM_IIf(condition, ifTrue, ifFalse) If condition = "" Then MM_IIf = ifFalse Else MM_IIf = ifTrue End If End Function %> <% Session("NEWVACANCYTITLE") = Request.Form("title") %> <% Session("NEWVACANCYSECTOR") = Request.Form("jobtype") %> <% Session("NEWVACANCYLOCATION") = Request.Form("location") %> <% If (CStr(Request("MM_insert")) = "form1") Then If (Not MM_abortEdit) Then ' execute the insert Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_recruta2_STRING MM_editCmd.CommandText = "INSERT INTO dbo.Vacancy (VacancyTitle, VacancyCategory, VacancyLocation, VacancyType, VacancyPaye, VacancyDuration, VacancyReference, VacancyExpiryDate, VacancyDescription, VacancyEmployerID, VacancyEmployeeID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" MM_editCmd.Prepared = true MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("title")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("jobtype")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("location")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, Request.Form("contract")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 50, Server.HTMLEncode(Request.Form("payrate"))) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 50, Request.Form("duration")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 50, Request.Form("reference")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 135, 1, -1, MM_IIF(Request.Form("expirydate2"), Request.Form("expirydate2"), null)) ' adDBTimeStamp MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 201, 1, -1, Server.HTMLEncode(Request.Form("description"))) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 5, 1, -1, MM_IIF(Request.Form("SITEID"), Request.Form("SITEID"), null)) ' adDouble MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 5, 1, -1, MM_IIF(Request.Form("Employee"), Request.Form("Employee"), null)) ' adDouble MM_editCmd.Execute MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL Dim MM_editRedirectUrl MM_editRedirectUrl = "afternewvacancy.asp" If (Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If Response.Redirect(MM_editRedirectUrl) End If End If %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script type="text/javascript" src="../Scripts/currentdate.js"></script> <% Function fRandomReference() Const sValidChars = "abcdefghijklmnopqrstuvxyz" Dim nCount Dim sRet Dim nNumber Dim nLength Randomize nLength = Len( sValidChars ) For nCount = 1 To 10 nNumber = Int((nLength * Rnd) + 1) sRet = sRet & Mid( sValidChars, nNumber, 1 ) Next fRandomReference = sRet End Function %><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Backoffice</title> <meta name="robots" content="noindex,nofollow"> <link href="Styles/clientsheet.css" rel="stylesheet" type="text/css"> <link href="Styles/clientforms.css" rel="stylesheet" type="text/css"> <meta http-equiv="refresh" content="1201;URL=index.asp"> <script src="../SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script> <script type="text/javascript" src="../Scripts/reflection.js"></script> <script src="../calendar/calendar.js"></script> <link href="../SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../Scripts/check.js"></script> </head> <body> <div id="wrapper"> <table border="0" cellpadding="0" cellspacing="0" class="table"> <tr> <td class="toptablebackoffice"><table border="0" cellpadding="0" cellspacing="0" class="toptablebackoffice"> <tr> <td><img src="../images/recrutalg.jpg" alt="Recruta" width="179" class="reflect rheight50 ropacity33" id="recrlogo" /></td> <td><table border="0" cellpadding="0" cellspacing="0" class="toptablebackoffice2"> <tr> <td class="recrutadate"><script language="JavaScript" type="text/javascript"> document.write("<span class=\"datetext\">"+doClock("W0","%20","D0","%20","M0","%20","Y0")+"</span>"); </script></td> </tr> <tr> <td class="loggedin"><%= Session("NAME") %> you are logged in </td> </tr> </table></td> </tr>
</table></td> </tr> <tr> <td class="tdrecrutanavbar"><ul class="nav"> <% If Not adminlevel.EOF Or Not adminlevel.BOF Then %> <li><a href="pagelist.asp">Page Manager</a></li> <li><a href="consultantlist.asp">Consultant Manager</a></li> <li><a href="newslist.asp">News Manager</a></li> <li><a href="jobsearchcriteria.asp">JobSearch Manager</a></li> <% End If ' end Not adminlevel.EOF Or NOT adminlevel.BOF %> <li><a href="oldregcandlist.asp">Registered Users</a></li> <li><a href="jbemgnt.asp">Jobs by Email Manager</a></li> <li><a href="account.asp">Account</a></li> <li><a href="logout.asp">Log Out</a></li> </ul></td> </tr> <tr> <td><table border="0" cellpadding="0" cellspacing="0" class="recrutamainarea"> <tr> <td valign="top" class="tdrightrecrutamain"><h1>New Vacancy </h1> <p class="invalid">Please complete all fields </p> <form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1" id="form1"> <table border="0" cellpadding="0" cellspacing="0" class="outervacancytable"> <tr> <td class="editvacancyvalue">Vacancy Title:</td> <td class="editvacancyform"><label> <input name="title" type="text" id="title" maxlength="50" /> </label></td> </tr> <tr> <td class="editvacancyvalue">Sector:</td> <td class="editvacancyform"><label> <select name="jobtype" id="jobtype"> <option selected="selected" value="">Select</option> <% While (NOT jobsectors.EOF) %> <option value="<%=(jobsectors.Fields.Item("Jobtype").Value)%>"><%=(jobsectors.Fields.Item("Jobtype").Value)%></option> <% jobsectors.MoveNext() Wend If (jobsectors.CursorType > 0) Then jobsectors.MoveFirst Else jobsectors.Requery End If %> </select> </label></td> </tr> <tr> <td class="editvacancyvalue">Location:</td> <td class="editvacancyform"><label> <select name="location" id="location"> <option selected="selected" value="">Select</option> <% While (NOT joblocations.EOF) %> <option value="<%=(joblocations.Fields.Item("JobLocation").Value)%>"><%=(joblocations.Fields.Item("JobLocation").Value)%></option> <% joblocations.MoveNext() Wend If (joblocations.CursorType > 0) Then joblocations.MoveFirst Else joblocations.Requery End If %> </select> </label></td> </tr> <tr> <td class="editvacancyvalue">Type:</td> <td class="editvacancyform"><label> <select name="contract" id="contract"> <option selected="selected" value="">Select</option> <option value="Temporary">Temporary</option> <option value="Permanent">Permanent</option> <option value="Contract">Contract</option> </select> </label></td> </tr> <tr> <td class="editvacancyvalue">Pay Rate:</td> <td class="editvacancyform"><label> <input name="payrate" type="text" id="payrate" maxlength="50" /> </label></td> </tr> <tr> <td class="editvacancyvalue">Duration:</td> <td class="editvacancyform"><label> <input name="duration" type="text" id="duration" maxlength="50" /> <input name="reference" type="hidden" id="reference" value="<%=fRandomReference()%>" /> </label></td> </tr> <tr> <td class="editvacancyvalue">Advert Expires on:</td> <td class="editvacancyform"> <input name="expirydate2" type="text" id="expirydate2" onFocus="this.select();lcs(this)" onClick="event.cancelBubble=true;this.select();lcs(this)"> </td> </tr> <tr> <td class="editvacancyvalue">Description:</td> <td class="editvacancyform"><label> <textarea name="description" id="description" rows="14"></textarea> </label></td> </tr> <tr> <td><input name="SITEID" type="hidden" id="SITEID" value="<%= Session("SITEID") %>" /> <input name="Employee" type="hidden" id="Employee" value="<%= Session("EMPLOYEEID") %>" /></td> <td class="editbutton"><label> <input name="submit" type="submit" id="submit" value="Submit" /> </label></td> </tr> </table>
<input type="hidden" name="MM_insert" value="form1" /> </form>
I've removed some of the not important stuff -- thanks
|
| | 4 answer | Add comment |
Thursday, 16 October 2008
|
| How to embed a text box in footertext of a GridView's boundfield Donzo 19:50:59 |
| | Hi !
I need to embed a text box in a footer of a GridView's boundfield column to get data prior to a row insert.
The textbox is usable and showing up in the web page source using View Source, but I cannot see it using an alert,
or after postback on the server side (code behind). Is there a way to reference such a control (embedded HTML in footertext) ?
If so, please advise ! (I embedded buttons in the command column which work and execute their click events ok)
this code builds the footertext:
Dim grdBF As BoundField = New BoundField
grdBF.DataField = colNamesArray(idx)
'tbox
If colIsEditableArray(idx) = "false" Then grdBF.ReadOnly = True
'this always puts a textbox in if editable, todo: chg to add some input control per type:
stCtrl = _
"<input id=""" & colNamesArray(idx) & "textbox"" Type=""Text"" size=""20"" maxlength=""30"" value="""">test</input>"
If colIsEditableArray(idx) = "true" Then grdBF.FooterText = stCtrl
dataGridView.Columns.Add(grdBF)
''''''''''''''''''''''''''''''''''''''
this code tries to access after postback, server side, but does not work, fix needed:
Dim tb As HtmlInputText = dataGridView.FooterRow.FindControl(colNamesArray(idx) & "textbox")
''''''''''''''''''''''''''''''''''''
This code tries to show it client-side, at click event, before the postback-submit: (we can show only the innertext)
var state1 = document.getElementById("txtState");
var deForm = document.getElementById("form1");
state1.value = "insertclicked" //indicate state
//debug:
var tb = document.getElementById("dataGridView");
var i,j;
var msg;
for(i=0; i<tb.rows.length;i++)
{
msg += "\r\n" + tb.rows[i].cells[2].innerText;
}
alert(msg);
deForm.submit() //postback to server to save the data only
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// the fix must be server side in code behind, since this all must be completely dynamic, and is dependent on a config file to get its table data from a sqldatasource which requires the boundfields in this gridview. fyi my templatefield columns all work fine, getting the data back in the request object since its otherwise blown away by a postback.
Regards !
Don
------------------------------------------- Don Collier, Senior Developer, AGI http://doncollier.clickhere2.net "Love converts hearts and gives peace."
|
| | 1 answer | Add comment |
|
| Best practice for using Profiles in Web Application? Charlisa 19:50:38 |
| | We are developing a Web Application in which we would like to utilize the System.Web.Profile object. Unfortunately, .NET does not create the infrastructure for Profiles in a Web Application, only in Web Site projects. Is there a best practice for utilizing profiles in a Web Application?
|
| | 1 answer | Add comment |
Wednesday, 15 October 2008
|
| Printing in ASP JP SIngh 23:46:38 |
| | Is it possible to send a file directly to printer in ASP?
I have an ASP page display the list of files associated with the record with hyperlinks to the files. I want to provide a link next to each file to allow people to click the button and send the appriopriate file to the printer.
Is it possible to do this in ASP or ASP.Net?
|
| | 4 answer | Add comment |
|