|
Member 2363916 wrote:
I use gc.collect to remove unused objects from memory but i think thats not a good solution.
Yes !! This is not a good practice to call GC Explicitly .
Member 2363916 wrote: so the question is how to dispose memory occupied byu datatable after working on it.
Can please just put the line of code for storing and retrieving data from data table.
|
|
|
|
|
I will get main datatable(dtMain) from db
and on filtering like this
dtmain.DefaultView.Rowfilter="Seq < runtimeVariable";
put result into new datatable and work on it
runtimeVariable will increamentedevery time a new chunk is fetched and previus chunk rows will be deleted from main table
|
|
|
|
|
Hi all,
In my main page i am having some link buttons and a login control,when i enter user name and password and press ENTER the page gets refreshed and it doesn't go on to the next page.i.e., how can i trap the enter key?
Thanks in advance....
modified on Tuesday, January 13, 2009 10:58 PM
|
|
|
|
|
sarangkhandare wrote: when i enter user name and password and press ENTER the page gets refreshed and it doesn't go on to the next page.i.e
I believe there should be login/submit button. So Set the button as default button of the page . So when user hit Enter it automatically fire the Submit/Login Button Event.
sarangkhandare wrote: ., how can i trap the enter key?
Yes , you can do it using JavaScript .
Just Explorer event.keyCode
Create JS methods, call that methods on onKeyDown Event and Trap the Key code
|
|
|
|
|
You can enter your redirection code or anything else in LoggedIn event of your login control
Human knowledge belongs to the world
|
|
|
|
|
Mates,
I need help. Could somebody know how to solve this problem. I already search to my friend Google. But, it seems theres no solution.
What I did:
I upload my asp.net files in the server and then trying to run at the browser will not run. If I will run the asp.net files in my localmachine or in my virtual machine this will run.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 48: ASP.NET to identify an incoming user.
Line 49: -->
Line 50: <authentication mode="Windows"/>
Line 51: <!--
Line 52: The <customErrors> section enables configuration
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: I upload my asp.net files in the server and then trying to run at the browser will not run. If I will run the asp.net files in my localmachine or in my virtual machine this will run.
I didn't get your point . Please clarify . What do you mean by upload files on Server ? Did you create Virtual Directory ?
|
|
|
|
|
What i mean is I upload the files (asp.net files) in webhosting server using the ftp in \wwwroot\MyWebsite. I cannot create a virtual directory because it is a webhosting site. I think the problem here is only a security issue on asp files because when i try a html file it will work.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
It sounds like your host has configured the authentication mode in the root web.config, and adjusted the properties for it to prevent modification of the authentication mode. Assuming your using some kind relatively cheap or even free ASP.NET host, it wouldn't be possible to use Windows authentication anyway. You would most probably need to use Forms authentication, which is most likely what they have enabled.
|
|
|
|
|
Can someone please refresh my memory?
What is that validator control to use to make sure a textbox is a valid date but not required.
Thanks.
I didn't get any requirements for the signature
|
|
|
|
|
It depends what kind of validate you need. Email, phone, zip etc. I think you need Regular Expression Validator.
|
|
|
|
|
Kamlesh3 wrote: It depends what kind of validate you need. Email, phone, zip etc. I think you need Regular Expression Validator.
No I was looking for a Date validator and not a regex.
I didn't get any requirements for the signature
|
|
|
|
|
Use Custom Validator
Date : <asp:textbox id="txtDate" runat="server" >
<asp:customvalidator id="valDate" runat="server">
ControlToValidate="txtDate"
ClientValidationFunction="ValidateDate"
ErrorMessage="Date is not valid" dispaly="dynamic"
</asp:customvalidator></asp:textbox>
ClientValidationFunction (ValidateDate) is a javascript funtion that will validate the date.
cheers,
Abhijit
CodeProject MVP
My Blog :Abhijit's World of .Net
|
|
|
|
|
Thanks for trying but I found the correct validator to use.
<code>
<asp:CompareValidator ID="TargetDateValidator" runat="server" Type="Date" Operator="DataTypeCheck" Display="dynamic" ValidationGroup="Default" ErrorMessage="The target date is not valid format = "mm/dd/yyyy" ControlToValidate="TargetDateTextBox"></asp:CompareValidator>
</code>
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
I am getting frustrated trying to test a new ASP .NET website in IIS on my local machine. Used to do this all the time in VS2002/2003, but since I started using VS2005 I've been happy with the new, built in "Development Server". I am presently trying to troubleshoot a new site that works fine when built in a local folder and run using the Development Server but has issues when uploaded to the production server. Thinking I might gain insight by deploying to IIS on my development box I did so, but find that while I can code files and build the project using VS to the ISS virtual directory (http://localhost/ASPTest/), I cannot run the app - the browser always issues a 403 permission error: "(HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage." WTF? I have tried everything I could think of with the permissions in the IIS manager applet but to no avail, and the same things happens with even a bare bones project - just a blank Default.aspx page. How can I create and build a page to an IIS folder from VS but then not have persission to view in in a browser, all on the same machine?!?
Mitchell
|
|
|
|
|
How did you deploy the application ? Create the virtual directory or just publish the Application and place the folder over inetpub>wwwroot.
Did you check the Authentication Mode ? What is that ? Is it Windows or Anonymous ?
|
|
|
|
|
Thanks for trying to help.
I've tried several different ways of setting it up, the simplest of which was to create a folder C:\Test, create a virtual filder in IIS (also named "Test") pointing to it, then creating a new website project in VS with Test in IIS as the project folder. VS creates Test.aspx and Test.aspx.cs in the Test folder, which I can see in C:\Test from Explorer and in the virtual folder Test in IIS. I build the project and can run the site (Ctrl-F5) in the Development Server but I cannot "Browse" the site, either from IIS or by selecting "View in browser" from the Solution Explorer.
Mitchell
|
|
|
|
|
What access permissions you have given to Virtual Directory during Creation.
You are required to give
1.Read
2.Run Scripts(Such as ASP)
3.Execute
Did you checked all three options.
Secondly, try giving the permissions
Right click on the Virtual directory from inetmgr
From submenu
All Tasks -> Permission Wizard
Follow the steps.
|
|
|
|
|
Thanks for trying to help.
Access permissions are already as you indicate:
1.Read
2.Run Scripts(Such as ASP)
3.Execute
I tried the Permission Wizard and selected "Public Web Site" but the problem persists.
Any other ideas?
Mitchell
modified on Wednesday, January 14, 2009 12:12 PM
|
|
|
|
|
Hi All,
When user navigate pages if the session expires I want to show alert message and redirect login page.
I written code for above reqruirement it is loging out but does not show message.
My code as follows
default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
Common comm = new Common();
if (Session[USER_CONTEXT] != null)
{
// do something...
}
else
{
// I want show javascript alert message to the user then click OK , redirect to logOutURL
comm.LogoffTohome();
return;
}
}
Common.cs
public void LogoffTohome()
{
string Jscript = "javascript:alert('Your session is over')";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "SessionTimeout", Jscript, true);
Session.Abandon();
HttpContext.Current.Response.Redirect(System.Configuration.ConfigurationManager.AppSettings["LogoutUrl"].ToString());
}
I really appreciate if your help...
Thanks
Rao
Thanks & Regards
Rao
|
|
|
|
|
Try firefox and firebug to debug javascript. Or vs 2008. You don't need
change string Jscript = "javascript:alert('Your session is over')";
to string Jscript = "alert('Your session is over'); window.location('" + System.Configuration.ConfigurationManager.AppSettings["LogoutUrl"].ToString() + "'); ";
You should redirect from javascript after the alert.
I didn't get any requirements for the signature
|
|
|
|
|
Thank you so much...
Thanks & Regards
Rao
|
|
|
|
|
Hi
In my online application I have to use paypal(Express checkout) for credit card processing. I have downloaded the required files given by them and added in my application, While compiling it gives an error The name 'UrlEncode' does not exist in the current context . The error occurs in the below given block of paypalfunction.cs(the class provided by paypal)
<br />
public string HttpCall(string NvpRequest)
{<br />
string url = pendpointurl;<br />
<br />
string strPost = NvpRequest + "&" + buildCredentialsNVPString();<br />
strPost = strPost + "&BUTTONSOURCE=" + <big>UrlEncode</big>( BNCode );<br />
<br />
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);<br />
objRequest.Timeout = Timeout;<br />
objRequest.Method = "POST";<br />
objRequest.ContentLength = strPost.Length;<br />
<br />
try<br />
{<br />
using (StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream()))<br />
{<br />
myWriter.Write(strPost);<br />
}<br />
}<br />
catch (Exception e)<br />
{<br />
<br />
}<br />
<br />
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();<br />
string result;<br />
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))<br />
{<br />
result = sr.ReadToEnd();<br />
}<br />
<br />
<br />
return result;<br />
}<br />
Any help to solve this issue will be appreciated; Thanks in advnce...!!!
Sebastian
|
|
|
|
|
Sebastian T Xavier wrote: strPost = strPost + "&BUTTONSOURCE=" + UrlEncode( BNCode );
use HttpUtility.UrlEncode()
|
|
|
|
|
Hi,
I have an IFRAME in my webpage. On button click I need to send some data from the form to IFRAME source page. Since the Iframe source page uses request.form(<param name="" />) I need to send this information by post method. On button click if i submit the form, will all the data from the form will be sent to the Iframe source page . Is it possible to send the selected data in submit method.
How can I achieve that?
regards
vj
|
|
|
|