|
|
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
|
|
|
|
|
How could you retrives the data from database, you should check the result set for number of rows,like
sample codes:
for SqlDataReader:
SqlDataReader dr;
if (dr.HasRows == true)
{
//display records
}
else
{
//no records
}
if you are using datatable, dataset etc,use like the below one
DataTable dt;
if (dt.Rows.Count > 0)
{
//records found
}
else
{
//no records
}
|
|
|
|
|
Place you code inside a try/catch block and test for the number of rows returned first
try<br />
{<br />
DataTable dt = GetRecords();<br />
if( dt.rows.count == 0)<br />
label.Text = "No records found";<br />
else<br />
...<br />
}<br />
catch(Exception ex)<br />
{<br />
label.Text = ex.message;<br />
}
only two letters away from being an asset
|
|
|
|
|
We can send mail using System.Net.Mail namespace in ASP .NET. But do we have any API to read mails via POP server using ASP .NET? Please help as I have not come across any such thing. Will I be able to read every details of the mail i.e. all the headers and the body?
|
|
|
|
|
|
|
Hi...
I want to add functionality of drag and drop columns in gridview through javascript.
how can i do this....
Thanks.
Regards,
PUJA FALDU
|
|
|
|
|
i dont know what is the function of cookies in ASP.net and how to get the infromation stored in cookies
|
|
|
|
|
Muhammad Tufail 1979 wrote: i dont know what is the function of cookies in ASP.net and how to get the infromation stored in cookies
Have a look at this link
Beginner's Guide To ASP.NET Cookies
This may help you !
|
|
|
|
|
cookies are used to store the values in text files. Basically cookies are text files used to store data in it. So, the user can retrieve the data later from the cookies.
|
|
|
|