|
in case , i have a hyperlink in the gridview , there too i am passing the data in navigateurl, which appears in the address bar of the destination page.
i can't use the server.transfer there in the source file in this context .
So in this case only encrypting querysting is the only way out ?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: So in this case only encrypting querysting is the only way out ?
Yes.
|
|
|
|
|
I also had same problem once and I followed a complex approach.......
I dont remember exact code but I was calling a javascript function in navigate url and I had a form with some hidden variables (which i wanted to send as querystring).
hyperlink.navigateurl = "javascript:FunctionName('var1','var2','var3');";
Then in javascript function
You can send url and other values which u want to send as querystring to javascript function.
Then in javascript assign the values to hidden fields.
form.Target = var1;
form.submit();
Let me know if you have any doubt or you want more clarification on any thing.
|
|
|
|
|
Sonia Gupta wrote: i have a hyperlink in the gridview
Instead of hyperlink, using asp:LinkButton would resort to postback and hence you can simply do away with long and lengthy querystrings.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
There are hundreds of the free web hosts(FreeWebs, Geocities, etc.). I know alot of them use Apache instead of IIS because it has an easy way of using web pages to create new sub-domains.
I am interested in doing this using ASP.NET with C#. I found an article on using a C# application, but it doesn't work with ASP.NET.
The article used WinAPI, and other core level reading/writing, to accomplish this. This doesn't seem like the right was to do it, I don't want my ASP.NET pages getting that deep into the server.
Anyone have any suggestions as to where to start?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
|
Sabari Ananth wrote: display all messages like tree view
Each message needs unique id. When new messages are replied, keep it's parent id. Write a recursive function which order the messages depends on parent id and message id.
Sabari Ananth wrote: i want the same in asp.net, plz urgent
Do you expect we to write code and give it to you ? You are probably in a wrong place my boy.
|
|
|
|
|
|
Sabari Ananth wrote: whether you seen my example or not
Whether you tried my suggestion or not ? I reiterate you need to write a recursive function which travels through all the messages and orders it. Also when new messages are posted keep it's parent id too, which will be used to put the message down to the appropriate parent message.
|
|
|
|
|
I have a website done on ASP.NET 2.0. As you all know ASP.NET 2.0 can work by uploading code behind files too without compiling it into assembly. So thinking in the performance perceptive, will you suggest this method of uploading code behind files too ?
My website is a CMS, which creates dynamic ASPX pages at runtime. In the pages which is created at runtime, I have not used any code behind files (written server side code in ASPX file). So will a compiled website makes any problem for the newly generated ASPX files as they were not present when the site was compiled ?
|
|
|
|
|
I think that if the website is not precompiled when it is uploaded, it'll just be compiled by the server the first time the web page is run. Other than the time it takes for the compilation to occur, I don't think you will notice any slow downs on subsequent visits to the website. Also, one webhost that I have used in the past didn't allow precompiled ASP .net applications. (Then again, my experience with that webhost is an entirely different story.)
I Hope this helps,
Mitch
|
|
|
|
|
Mitch F. wrote: I think that if the website is not precompiled when it is uploaded, it'll just be compiled by the server the first time the web page is run
Yes this is correct. But AFAIK, when code behind file are also uploaded and site is not in precompiled mode, runtime will maintain debug symbols which may affect performance. Anyway let me try it out.
|
|
|
|
|
hi iam getting error while using updatepannel control in my page dnt exactly the error is can anybody resolves it below is the code iam using here iam getting error near updatepannelcontrol
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" EnableTheming="true" AutoEventWireup="true"
CodeFile="ExtEltAddRequisation.aspx.cs" Inherits="ExtEltAddRequisation" Title="Add Request" %>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
function fnValidate()
{
if(fnAddRequisition()==true)
{
return true;
}
return false;
}
| <asp:label id="lblH" runat="server" forecolor="Navy" font-names="verdana" font-bold="True"
="" text="Add Request" enabletheming="false">
| | <asp:updatepanel id="UpdatePanel14" runat="server">
<contenttemplate>
<asp:label id="lblMsg" runat="server" text="Record Added Successfully." enabletheming="false"
="" font-bold="True" font-names="verdana" forecolor="Navy">
|
<asp:label id="lblDescription" runat="server" text="Display Name :">
| <asp:textbox id="txtDesc" runat="server" width="616px" enabletheming="false" height="15px">
| <asp:label id="lblElementType" runat="server" text="Element Type :"> | <asp:updatepanel id="UpdatePanel13" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpElementType" runat="server" autopostback="true" onselectedindexchanged="drpElementType_SelectedIndexChanged">
<asp:listitem text="NA" value="NA">
<asp:listitem text="Abstract" value="Abstract">
<asp:listitem text="Data" value="Data">
<triggers><asp:asyncpostbacktrigger controlid="drpElementType" eventname="SelectedIndexChanged">
| | <asp:label id="lblCountry" runat="server" text="Country :"> | <asp:dropdownlist id="drpCountry" runat="server" datavaluefield="CountryCode" datatextfield="CountryName">
| <asp:label id="lblDataType" runat="server" text="Data Type :"> | <asp:updatepanel id="UpdatePanel10" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpDataType" runat="server" datavaluefield="DataTypeId" datatextfield="DataTypeDescription" autopostback="True" onselectedindexchanged="drpDataType_SelectedIndexChanged1">
<triggers><asp:asyncpostbacktrigger controlid="drpDataType" eventname="SelectedIndexChanged">
| | <asp:label id="lblScope" runat="server" text="Scope :">
| <asp:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpScope" runat="server" autopostback="True" onselectedindexchanged="drpScope_SelectedIndexChanged">
<asp:listitem text="0" value="0">
<asp:listitem text="1" value="1">
<asp:listitem text="2" value="2">
<asp:listitem text="3" value="3">
<asp:listitem text="4" value="4">
<asp:listitem text="5" value="5">
<asp:listitem text="6" value="6">
<triggers> <asp:asyncpostbacktrigger controlid="drpScope" eventname="SelectedIndexChanged">
| <asp:label id="lblCurrency" runat="server" text="Currency :"> | <asp:updatepanel id="UpdatePanel11" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpCurrency" runat="server" datavaluefield="BaseCurrencyId" datatextfield="BaseCurrencyCode">
| | <asp:label id="lblSubIndustry" runat="server"> | <asp:updatepanel id="UpdatePanel2" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpSubIndustry" runat="server" datavaluefield="GICSCode" datatextfield="GICSDesc">
| <asp:label id="lblUnit" runat="server" text="Unit :"> | <asp:updatepanel id="UpdatePanel12" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpUnit" runat="server" datavaluefield="Unit" datatextfield="Unit">
| | <asp:label id="lblHistoricalLink" runat="server" text="Historical Link :"> | <asp:textbox id="txtHistoryLink" runat="server" width="200px" enabletheming="false"> | <asp:label id="lblFrequency" runat="server" text="Frequency :"> | <asp:dropdownlist id="drpFrequency" runat="server">
| | <asp:label id="lblCurrentLink" runat="server" text="Current Link :"> | <asp:textbox id="txtCurrentLink" runat="server" width="200px" enabletheming="false"> | <asp:label id="lblElementMode" runat="server" text="Element Mode :">
<asp:label id="lblNOFElement" runat="server" text="No. Of Element :" visible="false"> | <asp:updatepanel id="UpdatePanel5" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpElementMode" runat="server" autopostback="True">
<asp:listitem text="Single" value="S">
<asp:listitem text="Multiple" value="M">
<triggers><asp:asyncpostbacktrigger controlid="drpElementMode" eventname="SelectedIndexChanged">
<asp:updatepanel id="UpdatePanel6" runat="server">
<contenttemplate>
<asp:textbox id="txtNOFElement" runat="server" width="48px" visible="False" enabletheming="false">
| | <asp:label id="lblHardLimit" runat="server" text="Hard Limit :"> | <asp:textbox id="txtHardLimit" runat="server" width="200px" enabletheming="false"> | <asp:label id="lblUnitMode" runat="server" text="Standard Unit :"> | <asp:textbox id="txtUnitMode" runat="server" width="200px" enabletheming="false"> | | <asp:label id="lblSoftLimit" runat="server" text="Soft Limit :"> | <asp:textbox id="txtSoftLimit" runat="server" width="200px" enabletheming="false"> | | | |
|
|
<asp:label id="lblRule" runat="server" width="152px" forecolor="Navy" font-size="Medium"
="" font-names="Verdana" font-bold="True" text="Conversion Rule" enabletheming="False"> |
.
| |
.
|
.
| <asp:label id="lblPeriodType" runat="server" forecolor="Black" font-size="15px" font-names="verdana"
="" font-bold="true" text="Period Type :" enabletheming="false" height="10px" font-overline="False"> | <asp:updatepanel id="UpdatePanel3" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpPeriodType" runat="server" enabletheming="true" datatextfield="PeriodType" datavaluefield="PeriodTypeId" onselectedindexchanged="drpPeriodType_SelectedIndexChanged" autopostback="True">
<triggers><asp:asyncpostbacktrigger controlid="drpPeriodType" eventname="SelectedIndexChanged">
| | <asp:label id="lblApplicability" runat="server" text="Applicability :">
| <asp:updatepanel id="UpdatePanel4" runat="server">
<contenttemplate>
<asp:dropdownlist id="drpApplicability" runat="server">
| | | |
|
|
<asp:label id="lblComment" runat="server" text="Comment :">
| <asp:textbox id="txtComment" runat="server" width="312px" enabletheming="false" height="96px"
="" textmode="MultiLine" columns="10" rows="10">
| <asp:label id="lblUpload" runat="server" text="Upload File :"> | <asp:fileupload id="fileUpload" runat="server"> |
.
|
.
|
| <asp:button id="btnSubmit" runat="server"
="" text="Submit" onclientclick="return fnValidate();" onclick="btnSubmit_Click">
<asp:button id="btnCalcel" runat="server"
="" text="Cancel" postbackurl="~/reqindex.aspx" onclick="btnCalcel_Click">
|
|
|
|
|
|
|
hi,
i'm facing a problem in retreiving files from server. i have posted some files in a folder in my web server. while running the program it will show all the filenames in a dropdown list. i want to open a file while selecting the file name. its working in localhost but its not working after hosting the page.
plz help me
|
|
|
|
|
mukesh.mr03 wrote: its working in localhost but its not working after hosting the page.
Opening means just showing redirecting to the file and prompting for a download ? or opening the file using any file methods ? Can you post the code you used for this ?
|
|
|
|
|
this is the code i'm using in it. i have to open the file in any way(download or open)
DirectoryInfo di = new DirectoryInfo(Server.MapPath("Data/"));
string pa = di.ToString();
if (di.Exists == false)
{
di.Create();
}
FileStream fs = new FileStream(di + "/" + DropDownList1.SelectedItem.Text, FileMode.Open);
fs.Seek(0, SeekOrigin.Begin);
fs.Close();
ProcessStartInfo psi = new ProcessStartInfo(di + "/" + DropDownList1.SelectedItem.Text);
Process.Start(psi);
|
|
|
|
|
mukesh.mr03 wrote: ProcessStartInfo psi = new ProcessStartInfo(di + "/" + DropDownList1.SelectedItem.Text);
Process.Start(psi);
This looks fine in the case of desktop applications. But in ASP.NET , Process.Start() can't start a process in clients machine, because ASP.NET it works on server. You can redirect to the file instead, which forces browser to open a save dialog box, and user can download the file to his/her system. Use
Response.Redirect("Data/" + DropDownList1.SelectedItem.Text);
mukesh.mr03 wrote: DirectoryInfo di = new DirectoryInfo(Server.MapPath("Data/"));
string pa = di.ToString();
if (di.Exists == false)
Out of Topic : There is no need to use DirectoryInfo for checking directory existence. Directory class provides a static methods which checks directory existence.
|
|
|
|
|
|
the path you are giving must be of local file system.Try to download the file at client side and then open it.
Shujaat
|
|
|
|
|
this is the code i'm using in it.
DirectoryInfo di = new DirectoryInfo(Server.MapPath("Data/"));
string pa = di.ToString();
if (di.Exists == false)
{
di.Create();
}
FileStream fs = new FileStream(di + "/" + DropDownList1.SelectedItem.Text, FileMode.Open);
fs.Seek(0, SeekOrigin.Begin);
fs.Close();
ProcessStartInfo psi = new ProcessStartInfo(di + "/" + DropDownList1.SelectedItem.Text);
Process.Start(psi);
|
|
|
|
|
Hello frnd
I declared one variable(like dim num as integer=0),if i click the button1 i want to assign 1(num=1) if i click button2 i want to assign 2(num=2),but every time if i click the button the value is assigned properly but immedialy leaving that function again that variable value is zero,how to solve this problem?
|
|
|
|
|
Probably you are declaring the variable inside the functions. If you do that, a local variable is created which hides the member variable. The only code you want in the function is num = 4. If you have dim num as integer in the method, that's your problem.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi frnd
i didn't declare the variable inside function,i declared that variable ,variable declaration part.
|
|
|
|
|
use static variable for that
|
|
|
|
|
Just to be clear, that does not solve the problem, but if the problem was the value being different between class instances, this would be the solution.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|