|
c2423 wrote: If anybody is able to move it there I'd appreciate it!
AFAIK : There is no such privilege to any member to move the post from one from to another forum.
So, you have to do it your own
|
|
|
|
|
Not my day for forum navigation today it seems! I'll move it tomorrow.
Thanks,
Chris
|
|
|
|
|
when i download the file which is in arabic name and extension is .txt when i click on download button iam getting the arabic file name with junk characters and the file content is coming with aspx code
how to solve this problem
|
|
|
|
|
Where is the code for download ?
|
|
|
|
|
Response.AppendHeader(Content-Disposition", "attachment; filename=" +Server.UrlPathEncode(EncodeFile));
Sabrysoft
student at Faculty of Computers and Information(FCI)
4th year Computer scince Department
helwan University
Egypt
|
|
|
|
|
Greetings. I am trying to build a form with one listbox and one drop-down list.
For the listbox, I'd like the user to only be able to select 3 items. Is there any way to limit that? I'd also like the other control to be blanked out once the user selects something from the other control. I am able to do this for the listbox with onSelectedIndexChanged since only one selection is made, but if I do this for the Listbox it seems to trigger a postback each time. I was hoping for just the equivalent of OnFocus. Is this possible in .NET or would I have to use JavaScript?
And does anyone have any good code snippets for either of these?
Thanks in advance.
|
|
|
|
|
mjc225 wrote: I am able to do this for the listbox with onSelectedIndexChanged since only one selection is made, but if I do this for the Listbox it seems to trigger a postback each time.
Change the ListBox SelectionMode = Multiple , Put the ListBox inside Update Panel , Use One Counter- Maintain the Counter Value in ViewState ,Now onSelectionIndexChaged , Increase the count and Update the ViewState , Check the value on every partial post back, If its greater than three show message.
Hope this will help you !
|
|
|
|
|
I want to call .cs function from the .aspx page how can i call the function
Thanks,
|
|
|
|
|
hi Amit,
You can call a .cs function from .aspx page. But, what sort of a function has to be called - is it a build in function from cs library or a function created by you? If it is a build in library method, just include the namespace like how you include normally.
using System.Collections.Generic;
Now, if it is a method that you defined in your own class, you just need to make sure that you save the cs class under App_Code folder in your asp project.
Good Luck.
|
|
|
|
|
|
Well, ideally you should use a web service for this.
But, if it is a no go and you still want to follow this approach you can google for PageMethods.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I created a simple web site with one page, and moved it onto a win2003 server. When I try to hit the page from another machine, I get a 403 error. Why?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Good Day Sir John
How did you host it on the IIS , Please give us more info so that we can help.
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
John Simmons / outlaw programmer wrote: created a simple web site with one page, and moved it onto a win2003 server.
How did you deployed the site on IIS?
John Simmons / outlaw programmer wrote: When I try to hit the page from another machine, I get a 403 error. Why?
Your are trying to access by http://ipAddress/VirtualDir/Yourpage.aspx ?
|
|
|
|
|
Enable anonymous access for your site at IIS.
|
|
|
|
|
Hi,
Given below is the main aspx file in which the HTML Framework related code snippets are there:
<frameset rows="8%,*">
<frame src="Header.aspx" />
<frameset cols="20%,*">
<frame name="TreeView" src="TreeViewMenu.aspx" />
<frameset rows="36%,*">
<frame name="Parameters" src="ErrorPage.aspx" />
<frame name="DataDisplay" src="DataDisplay.aspx" />
</frameset>
</frameset>
</frameset>
TreeViewMenu.aspx page contains a tree view to which, Hierarchical Nodes are added dynamically. The issue that I am facing is that every time I click on a Node Item, the whole TreeView is re-loaded and Nodes are collapsed. Is there a way to avoid the re-loading of Tree node items / preserving the state of Tree Nodes? Please Help.
TreeViewMenu.cs code:
public partial class TreeViewMenu : System.Web.UI.Page
{
private const string cFrameName = "Parameters";
private const string cErrorPage = "ErrorPage.aspx";
protected void Page_Load(object sender, EventArgs e)
{
this.SaveTreeViewState();
NodeHelper.BuildTreeView(this.TreeView1);
this.RestoreTreeViewState();
}
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
this.SaveTreeViewState();
string strSelected = ((TreeView)sender).SelectedNode.Value.ToString();
string strNavigateURL = ((TreeView)sender).SelectedNode.ToolTip.ToString();
if (strNavigateURL.Length > 0)
{
Response.Write("<script>window.open('" + strNavigateURL + "','" + cFrameName + "');</script>");
}
else
{
Response.Write("<script>window.open('" + cErrorPage + "','" + cFrameName + "');</script>");
}
}
#region Private Procedures
private void SaveTreeViewState()
{
if (IsPostBack)
{
List<string> ExpandedList = new List<string>();
NodeHelper.SaveTreeViewState(TreeView1.Nodes, ExpandedList);
Session["TreeViewState"] = ExpandedList;
}
}
private void RestoreTreeViewState()
{
if (IsPostBack)
{
List<string> ExpandedList = (List<string>)Session["TreeViewState"];
NodeHelper.RestoreTreeViewState(TreeView1.Nodes, ExpandedList);
}
}
#endregion
}
|
|
|
|
|
Hello,
Win App:
takes a value from a textbox1 and send it throw parameter to a method in the website called WebDisplay(textbox1.text)
Web App:
WebDisplay method recives the parameter.
so how can i do that..?
thanks!
|
|
|
|
|
This is considered rude. You already posted the question in C# forum.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Very simple.
WinApps <-> Talks to something <-> Web Apps
"Talks to something" can be any storage
It may be a database, can be a text file, can be xml, etc. any datasource or medium that will communicate.
It can even be a web service, a WCF service,windows service etc.
A few months back I made a web tutor where I has to used windows service.
I implemented this concept there.
Hope this concept helps you.
For any further clarification, please ask me.
Niladri Biswas
|
|
|
|
|
Ok..can u send me 2 app.
Win App that sends paramter to the web app and the web.
Thanks
|
|
|
|
|
Mtyb wrote: takes a value from a textbox1 and send it throw parameter to a method in the website called WebDisplay(textbox1.text)
You want it will automatically display on web page or It will display after some event fired on Web page.
|
|
|
|
|
automatically display on web page..
and how can i call a method at win app from the web sercive..
thanks!!
|
|
|
|
|
Hi everyone,
actually im working on asp.net i have designed a student details page called student.aspx, it has got the student id textbox, student name textbox and other related fields i have the student details table in my sqlserver database. Now on entering the student id it connects to the database and retrieves the details corresponding to the id entered. everything is perfect the only problem that i encountered is when i enter an id that is not present in the database i receive the following command
Invalid operationException was unhandled by user,Invalid attempt to read when no data is present.
I dont want this to happen instead i need to have the msg as "No Record Found" in a Label. how do i handle this error... Do please help me...
Thanx in advance...
|
|
|
|
|
HasRows returns a bool to indicate if you have any rows retuned, but it doesn't actually advanced the reader to the next (or first) row. You need to replace the call to HasRows with a call to Read(), which advanced the reader to the next row. Read() will return false if there are no more rows to read.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks 4 ur reply.. well what i mean i actually hav 10 records in my database with id staring from s001 to s010 now while retrieveing the data according to the id entered if i enter an id for eg s011 which is not present in the database i need to catch the exception and make it display as "No record found for s011" something like this. so should i use the try and catch exception.. If it is so, can u please advice me as to how to use it...
Thanx in advance
|
|
|
|