|
Why do a postback ? I would do this in javascript.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
You can only use the InnerHtml property if the actual type of the control is LiteralControl or DataBoundLiteralControl, but your control is an HtmlAnchor.
If you want to change the contents of the control, clear the Controls collection of the control, then add a LiteralControl with the text that you want. Alternatively, if you know that it contains a single LiteralControl, get the reference to that control from the Controls collection, and change it's text.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Try this,
<a runat="SERVER" href="~/About.aspx" onclick="this.innerHTML='';">About<;/a>
Why are you wanting to do this? If you just want to hide the control you can use .Visible = false;
HTH
|
|
|
|
|
No, I do not want to hide the control. I just want to remove the link when that page is active where the anchor links to.
|
|
|
|
|
Use this inside your page_load of the master page.
string s= Page.ResolveUrl(LinkControl.HRef);
string u = Request.Url.AbsolutePath;
if( s == u)
{
LinkControl.HRef = "";
}
You can apply this logic to all of your links.
HTh
|
|
|
|
|
Thanks, that gave me some ideas.
|
|
|
|
|
I am trying to build a form using ASP.NET that will both send the form results to a database and email those results to a specific person. For example my form would include at least these items:
1. From Organization
2. Order Number
3. Responsible Organization Email address
4. Reason (Memo format)
I want the user to click a button and the data be sent to a database and also email to whatever address is ented into 3. Responsible Organization Email address.
Is this possible via ASP.NET edited using MS FrontPage?
|
|
|
|
|
farmer wrote: Is this possible via ASP.NET
Yes
farmer wrote: edited using MS FrontPage?
Apparently you can[^]
led mike
|
|
|
|
|
Ok, I am still trying to learn ASP.NET so not sure that this article from really assists me at this stage.
Does anyone have some basic sample code showing an ASP.NET form posting results to a database and emailing them to someone as well?
|
|
|
|
|
farmer wrote: Ok, I am still trying to learn ASP.NET
fair enough. I suggest you don't look for an example of doing both. One of each and then you try to put it all together. There are a massive number of .NET Database articles here on code project and I would guess there are one or more about sending email as well.
You can find the articles under the "CHAPTERS" section in the menu bar of the site on the left side of the page.
led mike
|
|
|
|
|
The email part is pretty trivial. ASP.NET also has automagic DB insert stuff that no professional dev would use, but that is perfect for your situation ( it writes a lot of the code for you ). I'd second the other response, look for articles on the DB stuff first, then worry about the email.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
hello all,
I'm getting this error when connecting to my sql server 2005 with asp.net 2.0
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
Regards
Amit Agarwal
|
|
|
|
|
Enable the remote connections in SQL server surface area management. Make sure you don't have any firewalls running which blocks SQL server port.
|
|
|
|
|
Thnaks for the reply,
yeah, I did the certain changes from server surface area Management.i'm trying to connect sql server 2005 express edition with asp.net 2.0 on a single my PC.
but still getting the same error.
Amit Agarwal
|
|
|
|
|
I want to upload picture in database using sqldatasource.I want to save the name of picture in database and the picture in a file on server.I couldnot find an article using sqldatasource .please help me.
|
|
|
|
|
Try using the keyword "BLOB" in your search.
Here[^] is a place to start via google.
Hope this helps.
|
|
|
|
|
bbc_sh wrote: I couldnot find an article using sqldatasource
Avoid using SQLDataSource. Write your own code which gives you more flexibility.
|
|
|
|
|
HI,
I have an website.It contains nearly 130 asp x pages. Here i have 6 modules like Home,About us,Services,contact us etc.,...
Now i need to create a site map link in the bottom of my website. when ever we click on the site map link it needs to show module wise links.
How can i create it...
Here i am giving a sample navigation site map link.
http://www.indiacar.com/navigation.htm[^]
Vasvai
|
|
|
|
|
Hello all,
I posted a question recently on using a SDK from an ASP.NET application and got some answers that made me rethink how i should approach an application i need to build.
Basically I have an ASP.NET application that needs to interact with a piece of hardware when either a user wants to interact (they tell the hardware to do something e.g. turn on turn off) or periodically (we poll for information from the hardware). Unfortunately the SDK only allows one call at a time so I need to provide my own locking around the SDK to ensure firstly that two asp clients attempt to interact with the hardware at the same time and secondly that a user doesn’t try to interact whilst a periodic action is taking place.
After some research and some questions on various forums I have decided to create a windows service which will create static instance of the SDK and the call these methods from the ASP.NET application through IPC remoting channels. From what I have read I will need to create two DLL’s one to interact with the SDK and contain the business logic and a DLL which will be used for the remoting objects.
Am just wondering if this seems the most logical way to tackle this problem or if anyone can think of a different/more efficient way or can see any holes in my solution. Am completely lost by this now as i can't find any examples of doing this it all seems to be about using web services but because i want to keep the state of the SDK object i didnt think i could use these??!!
Thanks,
Adam
|
|
|
|
|
I have a page with nothing but buttons and the only thing they do is a response.redirect(" ") to which ever page. If I let it sit still for roughly 2 minutes and hit the return key I get a blank page. Can anyone pls help me trouble shoot this problem.
Lonnie R Thomas
|
|
|
|
|
I assume you never redirect to an empty string. What is the code ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
one button may do a response.redirect("report1.aspx") and the return button does a response.redirec("reportsmenu.aspx")
Lonnie R Thomas
|
|
|
|
|
Maybe try setting SmartNavigation="true" in your page directive? Or check if your session is timing out...
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
I talked to my webmaster and in IIS the default is 20 minutes and that is what he has set. But the problem I am having is the page does not have to sit for that long to give me a blank page when hitting the return key. Never used smartnavigation but I will research. Thanks for the reply.
Lonnie R Thomas
|
|
|
|
|
checked on smartnavigation on msdn and they say it is obsolete,
Lonnie R Thomas
|
|
|
|