|
Ah - you cross posted. Just post in the ASP.NET forum if the question is ASP.NET.
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 )
|
|
|
|
|
Is it possible to to read the ftp file without downloading the files to the local drive ?
Thanks
|
|
|
|
|
You could start FTPing it and stop when you have the bit you want...
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 )
|
|
|
|
|
Use the WebClient.DownloadData method to get the file from ftp as a byte array.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Oh - I see what he meant now...
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 )
|
|
|
|
|
Do you have some sample codes,
My goal is connect to the ftp site read the content of the text file remotely and i would like to read it and send it to memory, made some change to the text file then ftp the file to another ftp server
at the moment i downloaded the file to local and made change to the file and then ftp to another server, then delete the local copy
if i can read of the server and stream it to memory that would increase the performance greatly.
any help would greatly appreciated
|
|
|
|
|
|
i want to develop web messenger
i read
http://www.codeproject.com/KB/HTML/Yahoo.aspx
but i have some problems
1)
when i click on the link after setting every thing yahoo chat interface appears which i dont want i have a text box and i want to send and recieve messages written in it
2)
if i add links for all my yahoo contacts it works i-e i can send text from yahoo chat interface but i dont want to hard code contacts all contacts should come automatically from my yahoo messenger contact list
Please help me
modified on Tuesday, February 19, 2008 9:11 PM
<div class="ForumMod">modified on Tuesday, February 19, 2008 9:12 PM</div>
|
|
|
|
|
<xsl:element name="li">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="concat('m','.aspx')"/>
</xsl:attribute>
<xsl:value-of select="aspdnsf:GetMLValue(Name)"/>
</xsl:element>
</xsl:element>
this code creates a list of links but i want to create dropdown how can i do this
modified on Tuesday, February 19, 2008 6:09 PM
|
|
|
|
|
I suggest reading a book on XSLT instead of blindly copying and pasting code from the web.
a is an anchor element, a link. Replace the element with a list item and wrap them in an element to create the list, and you're done.
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 )
|
|
|
|
|
Well, having fixed my problem with caching (or so I thought) by deleting an old website and re-publishing it, I now have a new set of fun problems. I suspect I've caused them whilst trying to force the new version of a page through. A different page is now misbehaving.
I have a button which when clicked, changes the datasource for a gridview based on it's own text, then changes it's own text (so that next time it is clicked it will perform the other action, and change it's text back again). However now, although the first click works ok* when clicked again it fires as though it has the same text.
protected void btn_switchallorown_Click(object sender, EventArgs e)
{
switch (btn_switchallorown.Text)
{
case "Show queued requests for ALL departments":
btn_switchallorown.Text = btn_switchallorown.Text.Replace("ALL departments", "YOUR department");
break;
case "Show queued requests for YOUR department":
btn_switchallorown.Text = btn_switchallorown.Text.Replace("YOUR department", "ALL departments");
break;
default:
break;
}
gvw_Queued_Requests.DataBind();
gvw_totals.DataBind();
}
Can anyone suggest what I may have broken? This all worked quite happily before? I have tried re-enabling the viewstate but no joy...
* except that a tree-view used for navigation collapses to it's root node (never did before).
|
|
|
|
|
Have you tried setting a breakpoint to see what's happening ? This code does n't change the datasource at all, it just changes the button text and rebinds to the same sources they have.
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 )
|
|
|
|
|
Yes - I set a breakpoint at the beginning of this event handler - I have removed the sql changes for clarity brevity
The issue I have is that the first time the event fires, the text displayed is changed (as expected). The second time the button is clicked, the event fires but the button text (which I am using in the switch) remains the same as the first click, triggering the same case again. I think the issue is something to do with the postback - the navigation tree collapses on postback.
My Page_Load event is:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (User.Identity.Name != "")
{
if (Session["userName"] == null)
Session["userName"] = Requestor.user_name(User.Identity.Name, 3);
if (Session["deptname"] == null)
Session["deptName"] = Requestor.dept_name(Session["userName"].ToString());
string deptname = Session["deptName"].ToString();
if (!Requestor.Valid_User(User.Identity.Name))
Response.Redirect("dberror.htm");
else
{
Navigator.FillTreeMenu(NavTree, deptname);
}
lbl_User.Text = Requestor.user_name(User.Identity.Name, 1);
}
else
Response.Redirect("usernameerror.aspx");
SQLQueued.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
SQLQueued.SelectCommand = "cp_Get_Queued_Info";
gvw_totals.DataBind();
}
}
In addition to the button misbehaviour, lbl_User.Text gets blanked. I think it has to be a viewstate/caching/compilation thing..?
|
|
|
|
|
OK - "problem" solved. It was a viewstate issue.
Some idiot had discovered that disabling the viewstate on a slow-loading page improved performance. And decided to do the same thing on every page. Including the Master Pages.
Which is why enabling/disabling the viewstate on the content page did pretty much zip.
My apologies for wasting your valuable time.
Of course had I been documenting my modifications as I went along, I might have twigged a little quicker...
|
|
|
|
|
How would i specify a colour for a button
e.g.
btbutton.color = color #ffffff
i need to set it to a custom # color
thanks
|
|
|
|
|
Use the FromArgb method to create a color from color components:
btbutton.color = Color.FromArgb(255, 255, 255);
or
btbutton.color = Color.FromArgb(0xff, 0xff, 0xff);
If you want to specify a single hexademial value, you have to specify the opacity also:
btbutton.color = Color.FromArgb((int)0xffffffff);
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
<asp:TemplateField > <ItemTemplate>
<%-- <asp:LinkButton ID="lnkReplyHeading" runat="server" ><%# DataBinder.Eval(Container.DataItem,"u.username") %></asp:LinkButton>--%>
<asp:LinkButton id="lnkusername" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"u.username")%>' commandname="ss" > </asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
System.Data.DataRowView' does not contain a property with the name 'u'.
modified on Tuesday, February 19, 2008 8:43 AM
|
|
|
|
|
Hi Ritu!
Can you plz explain the problem in detail. I can't understand what is the problem.
|
|
|
|
|
ritu4321 wrote: ]]>
Try using,(remove 'u.')
<![CDATA[<%# DataBinder.Eval(Container.DataItem,"username")%>]]>
|
|
|
|
|
Hello there guys.
I have a little web application in ASP.NET but now I have errors I totally dont understand.
It says "ASP.NET Runtime error :Could not load file assembly 'System.AddIn Version = 2.0.0.0, Culture = Neutral, Public Key Token = 603F5F7F11D0A3A"
I have no idea what this means guys.I tried google.
Nothing.
kagiso
|
|
|
|
|
I'm getting this error from a page that has been edited. Neither the aspx nor the code behind files are asking for this field any longer, and the stored procedure has been changed and does not include the field. Why is it falling over on the live server? It runs perfectly well on my local machine in debug? Is there some kind of caching in IIS that I need to flush in order to use the new version of the pages?
Any suggestions as to where to look?
|
|
|
|
|
Did you remember to upload the compiled .dll to your live server? If you just sent the .aspx then you've not updated the code-behind.
|
|
|
|
|
I've been using the Visual Studio "Copy Website" option, copying the aspx and aspx.cs files - never had a problem before...
OK - I've just tried an iisreset and same result - I think the issue may be that I have a cached binary somewhere (perhaps on the ISA server).
modified on Tuesday, February 19, 2008 8:43 AM
|
|
|
|
|
Resolved by deleting the files from the server and re-publishing. Still not sure where the old files were being cached.
|
|
|
|
|
I want it like this: when users try to access some page, if the page is login.aspx or permitted by role, then let it go; but when it's denied by role config, I want kept signed in and to a warning page.
For now, it's forced to sign out and redirect to login.aspx.
|
|
|
|