|
C# ASP is called ASP.NET. ASP is something else.
You can create a page which just has an asp:Literal control, and insert your HTML into that. But, I'm not sure if that helps, because that would generate a page to send to the client, is that what you want, or do you want to post it direct to paypal ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
I´ve got from a web services a soapexception an d i would like to get the real message from the web services: That is: _m"System.Web.Services.Protocols.SoapException: El servidor no puede procesar la solicitud. ---> System.Exception: aaa es un ceo \n en Service.Divide(Int32 a, Int32 b) en d:\\aaa\\Mis Documentos\\Visual Studio 2005\\WebSites\\WebSite2\\App_Code\\Service.cs:línea 25\n --- Fin del seguimiento de la pila de la excepción interna ---"
I would like to get the message: " aaa es un ceo \n"
|
|
|
|
|
Hi,
I am creating a user control in which datagrid/gridview is added.
This usercontrol is added to the page.
Data is provided to the datagrid from dataset/datatable in the page codebehind.
Everything is working fine except pageindexchanged event (in User Control), Since after the pageindexchanged event databinding is done which is presently done in page codebehind. In short i wanna assign data to the datagrid after the pageindexchanged event which is fired in user control.
How can i resolve such problem? Can help me out please?
Please revert in case of further clarification required.
Regards,
Anees
|
|
|
|
|
Data should always be assigned in the prerender event, as it fires after control events. The load event, always fires before.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian Graus for your reply, but may be i am not able to put up my question in the right way. So let me clear it out.
I am working on a project in which the user controls will be used as much as possible so that the end application developer will not have the problem to create the same control repetedly. Thats the reason we are creating DataGrid control in the User control so that the developer will just drag drop it and assign it the dataset/datatable from the BLL. Now the problem is Pagechange event is fired in the user control and the data is assigned in the BLL, so how can i call the BLL method in Pagechange event so that it can be fired in the user controls pagechange event after assigning the new page number. For e.g if i am not using user control then i can use the below code.
void PageIndexChanged(object sender, DataGridPageChangedEventArgs e)
{
DataGrid grid = (DataGrid) sender;
grid.CurrentPageIndex = e.NewPageIndex;
// Bind data and refresh
grid.DataSource = ...;
grid.DataBind();
}
In my case the event is fired in the user control but the last 2 lines of assigning the datasource and binding the data is not done in the event it is done in the BLL.
Let me know if further clarification is required.
Thanks
|
|
|
|
|
Your control should set it's data source and databind in the prerender event. If it doesn't do this, if it's done higher up, and there's a good reason for this, then it should still work, so long as it's done in the prerender event, where it should be. If you are calling a proc that needs the page number, expose it as a property.
Beyond that, I don't see the issue. You're not showing the datasource code, so I don't konw if you need the page number to call it, but if you do, set a property. If you don't, if the control is handling paging, then it shouldn't matter, so long as you call after the event fires.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi every body
how can i put picture(logo) on the left of the URL as we see the logo of codeproject on the left of URL
Thaks in advance.
haitham
|
|
|
|
|
You need to have an .ico file in your web root named favicon.ico...
http://www.chami.com/tips/Internet/110599I.html[^] has the above method and also a second way of doing so...
I have checked method #2 on both IIS, Casini, and Apache web servers and they work nicely
|
|
|
|
|
Presently i have build a realestate webportal using ASP.NET with C#.
And Client requiremetn is : This webportal has to be appered in topten list while any user search for realestate sites in google.
Plz Help me how to do these.
thanks in Advance
|
|
|
|
|
This can be done if the real estate compnays pays some bugs of amount only.
If the real estate pays some bugs of amount to google we can bring it to first also.
Regards,
Satips.
|
|
|
|
|
|
Satips wrote: If the real estate pays some bugs of amount to google we can bring it to first also.
Absolutely Wrong
|
|
|
|
|
This is completely dependent on the content of your website. Google indexing mainly depends on these criteria s (Not a complete list)..
- Your site response time
- Good content
- Good meta information ( I think presently google won't care this )
- Friendly URL's
- Match with URL and content
Check your site in some textbrowsers. This is how the search engine spiders see your site. Check everything looks fine in textbrowsers. You can use LYNX text browser.
My suggestions are, search for any real estate websites, and look at the structure they have. And compare that with your's. You can get some good informations on some of SEO forums. Or try using google Adwords. But in that case you need to pay. But that also depends on the keywords you provide.
|
|
|
|
|
Thank u for u r valible information navaneeth
|
|
|
|
|
Hello!
I have a nice book on ASP.NET but it doesn't explain how to for instance transfer data like a string from one aspx file to another.
What I want to do is enter a string in Default.aspx and then pass that string to Default2.aspx, so that the string can be used in Default2.aspx.cs
I tried a lot of things, but they were all guesses.
Could someone give me some pointers?
Ranger.
Novice
|
|
|
|
|
|
Default.aspx.cs
protected void Button_Click(object sender, EventArgs e)
{
Context.Items["SourceLabel"] = SourceLabel.Text;
Server.Transfer("Default2.aspx");
}
Default2.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
TargetLabel.Text = (string)Context.Items["SourceLabel"];
}
This should work, but it doesn't. Did I forget something?
Ranger.
Novice.
|
|
|
|
|
All I am trying to do is pass a string from Default.aspx to Default2.aspx,
and it just doesn't seem to work!!!
Ranger.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ClassName="_Default" %>
public partial class _Default : System.Web.UI.Page
{
public string message
{
get
{
return BronLabel.Text;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button_Click(object sender, EventArgs e)
{
Server.Transfer("Default2.aspx");
}
In Default2.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Reference Page="~/Default.aspx" %>
public partial class Default2 : System.Web.UI.Page
{
_Default sourceClass;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
sourceClass = (_Default)Context.Handler; <<< exception cannot cast
DoelLabel.Text = sourceClass.message;
}
}
}
Novice
|
|
|
|
|
At a glance you seem to be relying on server.transfer, which, when properly execute, will make the query string and any form variables from default available to default2.
try changing
Server.Transfer("Default2.aspx")
to
Server.Transfer("Default2.aspx", true);
Here is an article on this:
Server.Transfer Vs. Response.Redirect[^]
|
|
|
|
|
TopCoderJax wrote: Server.Transfer("Default2.aspx", true);
Tried it it didn't work and I didn't get the message associated with the bug.
Will read the article you posted, thanks!
I was thinking, could it be because the 'sender' is the Default.aspx that it won't work?
Will try some more tomorrow.
Thanks,
Ranger.
Novice
|
|
|
|
|
Tried it, and it works now!
Thanks!
Ranger.
Novice
|
|
|
|
|
i got an HTML form with the action="/scripts/myASP.asp"
but when submitting , the browser gets error that : couldnt fined "/scripts/myASP.asp"
what could the reason be !?
|
|
|
|
|
Did you create the file myASP.asp in the scripts folder.
|
|
|
|
|
Gday everyone,
I have a problem that I really need your help
I have a hyperlink, when users click on it, it takes to a lower part in same page.
Please help
Thanks
eric
|
|
|
|
|