|
Ok you can find it...
1. For button control, get the control from 'page.Request.Form'.
2. For other controls like dropdown etc from page.Request.Params.Get("__EVENTTARGET")
Actually you will get the ID's of the control in the string format... So after getting the ID use page.FindControl("ID") and get the Control object.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi ,
I have a web application where in one form im trying to access(read and write) the file present in my application folder it is working fine in my PC but when i Deployed it using MSI and installed in other machine(Windows Xp IIS 5.1) im not able to access the file...
Error comes like
Access to path "C:\inetpub\wwwroot\MyApplication\config.xml" is denied
using cacls.exe i gave permission to ASPNET account to access file but that"s not working even ....Please help me out...
|
|
|
|
|
I think you have to give the IUSR permission also... Also make sure that the file is not marked as ReadOnly when you are attempting to write ..
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
You can check to see which user your application is running under. Right-click your website in IIS and go to Properties. Select the 'Directory Security' tab and then 'Edit' under 'Authentication and access control.' The first box up there is the user that .NET 2.0 runs under. In most cases it is IUSR_ServerName. Make sure you apply modify permissions for that user on the config.xml or whatever files you intend to write to. Good luck!
Ranjit Viswakumar
Professional Services Specialist
HostMySite.com[^]
|
|
|
|
|
Thanks for your suggestion it really helped me.....
|
|
|
|
|
Hi freinds.
I am working in asp.net. I have one method that generates large PDF file from html string. When i click to generate pdf file, it consumes 100 cpu so my application goes down.
I want to allocate memory to this process to complete its task.
Can anybody guide me regarding this issue?
Thanks
Imrankhan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi all,
I m getting the below error page in my site when i send mail to an invalid email id ( i.e recipient email address does not exist. ). If suppose i gave the correct available email ID, it works fine...
i ve changed in web.config mail settings and in mail sending message , but i cant get correct output.
ERROR page:
==========
[SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)]
Server Error in '/' Application.
Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)]
System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) +881192
System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) +39
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +95
System.Net.Mail.SmtpClient.Send(MailMessage message) +2004
App_Code.Email.MailSender(String sendFrom, String sendTo, String sendSubject) +110
App_Code.Email.EmailThisFriend(ArrayList objMailContent) +457
EmailThisPage.btnSubmit_Click(Object sender, EventArgs e) +458
System.Web.UI.ImageClickEventHandler.Invoke(Object sender, ImageClickEventArgs e) +0
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +86
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Ashok
|
|
|
|
|
Okay, so everthing is fine. Just catch the exception where you send the mail and display a better error message to the user.
|
|
|
|
|
Hello Friends,
I've a XML file having data as shown below and i want to display this data in GridView using the XMLDataSource. Actually i want to show the record where Active is 1
<TotalBhakti>
<Videos>
<ID>1</ID>
<Video>No Video(s)</Video>
<VideoTitle>No Video Title</VideoTitle>
<Description>No Description</Description>
<Guru>No Guru</Guru>
<Lord>No Lord</Lord>
<Category>No Category</Category>
<Genre>No Genre</Genre>
<Tag>No Tag</Tag>
<Active>1</Active>
</Videos>
<Videos>
<ID>2</ID>
<Video>AA</Video>
<VideoTitle>AA</VideoTitle>
<Description>AA</Description>
<Guru>AA</Guru>
<Lord>AA</Lord>
<Category>AA</Category>
<Genre>AA</Genre>
<Tag>AA</Tag>
<Active>1</Active>
</Videos>
</TotalBhakti>
XML Data Source code is here
<asp:XmlDataSource ID="TotalBhakti" runat="server" XPath="TotalBhakti/Videos" DataFile="~/XMLFiles/XMLFile1.xml"></asp:XmlDataSource>
and
GridView Code is here
<asp:GridView ID="GridView1" Runat="server" DataSourceID="TotalBhakti" AutoGenerateColumns="False">
<Columns>
<asp:BoundField HeaderText="ID" DataField="ID"></asp:BoundField>
<asp:BoundField HeaderText="Video" DataField="Video"></asp:BoundField>
</Columns>
</asp:GridView>
But i get no data in GridView and also if i remove the XPath from the XMLDatasource then i get an error like "ID" field not found in the DataSource please suggest me the way to come out of this problem.
|
|
|
|
|
Did you set any filters for the GridView? Do you see the headers?
|
|
|
|
|
Sir Can you let me know ........
I've a GridView in which i'm fetching the data from the XMLFile.
My XML file is shown below. In this XML file i've a Active node and i want to display only the data where the Active is 1 that's mean to fetch only first record but it's bringing all records.
<TotalBhakti>
<Videos>
<ID>1</ID>
<Video>No Video(s)</Video>
<VideoTitle>No Video Title</VideoTitle>
<Description>No Description</Description>
<Guru>No Guru</Guru>
<Lord>No Lord</Lord>
<Category>No Category</Category>
<Genre>No Genre</Genre>
<Tag>No Tag</Tag>
<Active>1</Active>
</Videos>
<Videos>
<ID>2</ID>
<Video>No Video(s)</Video>
<VideoTitle>No Video Title</VideoTitle>
<Description>No Description</Description>
<Guru>No Guru</Guru>
<Lord>No Lord</Lord>
<Category>No Category</Category>
<Genre>No Genre</Genre>
<Tag>No Tag</Tag>
<Active>0</Active>
</Videos>
</TotalBhakti>
here is the code to display in the GridView
XmlDataSource data = new XmlDataSource();
data.DataFile = Server.MapPath("~/XMLFiles/XMLFile1.xml");
GridView1.DataSource = data;
GridView1.DataBind();
|
|
|
|
|
|
I'm also using the XPath as shown below but that's not correct please make it
data.XPath = "TotalBhakti/Videos/Active[@Value=1]";
|
|
|
|
|
What about
TotalBhakti/Videos[Active='1']
|
|
|
|
|
can any one guide me that i have a dropdownlist on master page and on seleectedindex change of that dropdown i want to perform some action on content page.
can any one guide me how can i achieve this functionality????
umerumerumer
|
|
|
|
|
Hook up a delegate that hte master page fires, and the client page subscribes to. To make this easier, create your own base page, which has it's own Master property that returns a fully typed version of your master page, so you're not casting it all the time.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello friends
( I've download GMAPS Control )
I am dynamically adding a point to Gmap, Now when the user clicks on that map Point i want to fire a event in aspx page (Call a C# Function)
I'll be thankful for the help
Happy programming
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
You'll need to fire an AJAX call to do this without a postback.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hmmm
Let me clear what i want to do .
there is a url present in the InfoHTML of a point
what i tried to do is <p style='color:blue;' onClick='myPopup2('http://www.google.co.in/)'>Edit Details</p>
here is my js function
function myPopup2(urlstring) {
window.open(urlstring , "myWindow",
"status = 1, height = 350, width = 325, resizable = 0,scrollbars = no" )
This function is not working .
* its working when i do not pass the argument and write the url in place of url string
even the function is not getting called up when i am having a argument in it
Please help me with this
Happy programming
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Are you talking about Google Maps??
Abhishek Sur
|
|
|
|
|
yes it is Google Maps
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
First, you need to register click event of your map.
Use
GEvent.addListener(map,"click",function(overlay,point)
{
}
);
Now inside the click, you can do XMLHttp request to your web server yourself through the use of XMLHttpRequest object thereby raising an event in your custom handler or you can make use of ICallBackEventHandler that raises serverside event from javascript.
You can look into my article on Googlemaps where in Example 8 I have used XMLHttp objects to raise ajax calls.
http://www.codeproject.com/KB/scripting/Use_of_Google_Map.aspx[^]
Regarding ICallBackEventHandler you can have a look on the process from this article:
http://msdn.microsoft.com/en-us/library/ms178208.aspx[^]
hope this will help you....
Abhishek Sur
|
|
|
|
|
Hi i want to learn share point
do i need windows server 2003 for that
how can i develop sharepoint application on xp is it posible
|
|
|
|
|
google broken where you live ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Here ya go-
http://technet.microsoft.com/en-us/library/cc288751.aspx[^]
SharePoint is a web-based document collaboration application. You'll need one of the following-
♪ Windows Server 2003, Standard Edition
♪ Windows Server 2003, Enterprise Edition
♪ Windows Server 2003, Datacenter Edition
♪ Windows Server 2003, Web Edition
Check the requirements for hardware also. It's not something you want to run on a good ol' fashion desktop computer. Good luck!
Ranjit Viswakumar
Professional Services Specialist
HostMySite.com[^]
|
|
|
|