|
|
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 )
|
|
|
|
|
I declared the static variable in declaration part like " static num as int16=10" but is showing error,if i declare that variable inside function means that not showing error.how i want to declare static variable in declaration part.
|
|
|
|
|
ps.srinivasan wrote: declaration part.
What is this declaration part ? A static variable in VB.NET can be declared like
Static Myvar As Integer = 1 I don't think that declaring variable into static won't solve the problem. Where you declared the variable now ?
|
|
|
|
|
N a v a n e e t h wrote: Static Myvar As Integer = 1
I declared the variable like that.
N a v a n e e t h wrote: I don't think that declaring variable into static won't solve the problem.
so how i want to solve that problem.my question is simple if i click different button i want to assign different value for variable. Where i want declare that variable?,how i want to declare that varible?
|
|
|
|
|
ps.srinivasan wrote: Where i want declare that variable?,how i want to declare that varible?
You need to declare your variable inside the form.
Public Class Form1
Inherits System.Windows.Forms.Form
Dim Flag As Integer = 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Flag = 1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Flag = 2
End Sub
End Class
|
|
|
|
|
N a v a n e e t h wrote: Public Class Form1
Inherits System.Windows.Forms.Form
sorry frnd my question for web from not window form
Public Class WebForm2
Inherits System.Web.UI.Page
Dim Myvar As Int16 = 0 'this code is executing when ever i click the button.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Myvar = 1
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Myvar = 2
End Sub
End Class
|
|
|
|