|
i m using asp.net 2.0.i take a check box..when i check the check box that time checkbox_changechecked event is calling..but when i unchecked the check box then these event is not calling...now wht cani do?
|
|
|
|
|
Does it postback when you change the CheckState ??
Well, I think it should be calling, Please let us look at the code to help.
|
|
|
|
|
I do not know SharePoint other than using it to checkin/checkout files to share point and do not know about Lists, Document workspace etc.
I have a windows C# application. I need to pick files (*.doc/*.xls/*.pdf/etc) from my local machine and store them in share point site portals shared area (suppose C:\xyz). This should be done remotely and should be done by the exposed web services of share point and not using SharePoint's dlls (Microsoft. SharePoint).
I also should have the ability to store the link/path where the file was uploaded and also should be able to launch the files by clicking on the link visible to user in my application.
http://www.csharphelp.com/archives4/archive602.html
I have got some help from the above link but the example present there is not working properly because it needs some inputs and then it returns outputs. Since I am not able to understand its terms and so I am not able to pass appropriate values to it as input.
Any help will be appreciated.
Thanks in advance
Email: izharindelhi@gmail.com
Thanks And Regards,
Izhar Arman
|
|
|
|
|
When i try to send i caught as exception like below,
System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.SmtpReplyReader.ReadLine() at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message)
and mycode is
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
MailMessage mail = new MailMessage();<br />
mail.From = new MailAddress("shankarganesh.mca@gmail.com");<br />
mail.To.Add(new MailAddress("shankarganesh.mca@gmail.com"));<br />
mail.Subject = "Subject";<br />
mail.Body = "This is Body";<br />
mail.IsBodyHtml = true;<br />
mail.Priority = MailPriority.Normal;<br />
SmtpClient client = new SmtpClient();<br />
client.Send(mail);<br />
}<br />
catch (SmtpException ex)<br />
{<br />
Response.Write(ex.InnerException);<br />
}<br />
}
can anyone find solution for this?
|
|
|
|
|
try this code
MailMessage message = new MailMessage(strEmailFrom, ToEmail, Subject, Body);
message.IsBodyHtml = IsBodyHtml;
SmtpClient emailClient = new SmtpClient(SMTPServer);
System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential(SMTPUser, SMTPPassword);
emailClient.UseDefaultCredentials = false;
emailClient.Credentials = SMTPUserInfo;
emailClient.Send(message);
|
|
|
|
|
Where has this been code been connected to an actual, live, mail server ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You did not setup the Port
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
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Go Through this link Once,It might Help You..
I Have not Tried This...
Send Email
Sundeep Ganiga
When the only tool you have is a hammer, everything looks like a nail.
Come Forth Yourself to Click "Good Answer" for any expected solution.
Let us Support our C Project Programmers who provide solutions here.
|
|
|
|
|
Are there template web projects in ASP.NET for VS with smart designs to just to launch the project and start customizing it.
Чесноков
|
|
|
|
|
|
When the page of the ASP.NET web application is displayed, the controls e.g. login, are displayed according to computer OS language. How to setup it to show always in English or some other language.
Чесноков
|
|
|
|
|
|
Create a Resource File for each language with all the static strings that you have.
set the CurrentThread CultureInfo to UserLanguage.
Thread.CurrentThread.CurrentCulture = new CultureInfo(lang);<br />
lang could be Request.UserLanguages[0] or any language you want.
Change the Webpage static strings to StringResources.ResourceManager.GetString(resName);
resName will be the key which finds the string on actual language.
|
|
|
|
|
Hi all,
Is it possible to access a parent virtual directory from a child virtual directory.ie.I have one virtual directory in my ftp site,and that virtual directory contains another virtual directory.Then is it possible to access that parent virtual directory from the child virtual directory?If possible how can I access it? These virtual directories contains asp.net files.
Thanks
Denny
|
|
|
|
|
Member 4260270 wrote: .I have one virtual directory in my ftp site,
You are talking about Ftp or IIS Virtual Directory ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
I am just starting to use ASP and am very green to its data structures, so I'm probably going about this completely wrong. On the C# side I have connected to the database and taken the info I need, but I need to strip the string of the extension before it's displayed on the asp side. Without the whole table and databinding, I would feel confident doing this, but with these two factors I'm not sure how to go about this. Is there any easy way to make my query into a table and then edit that table's entries, and set that to the datasource for binding, or am I looking at this the wrong way?
SqlConnection conn = new SqlConnection(ConnectionPath);
conn.Open();
string queryClasses = "SELECT WSS_Content.dbo.AllDocs.LeafName FROM
WSS_Content.dbo.AllDocs LEFT OUTER JOIN WSS_Content.dbo.RecycleBin ON WSS_Content.dbo.AllDocs.Id =
WSS_Content.dbo.RecycleBin.DocId WHERE (WSS_Content.dbo.RecycleBin.DocId IS NULL) AND (WSS_Content.dbo.AllDocs.Extension = 'zip')";
SqlCommand availableClasses = new SqlCommand(queryClasses, conn);
SqlDataReader reader = availableClasses.ExecuteReader();
SQLQueryClassListings.DataSource = reader;
SQLQueryClassListings.DataBind();
reader.Close();
<asp:GridView ID="SQLQueryClassListings" AutoGenerateColumns="false" runat="server"
BorderWidth="1px" BackColor="White" CellPadding="5" BorderColor="DodgerBlue" HeaderStyle-
BackColor="#0147FA" HeaderStyle-ForeColor="White">
<Columns>
<asp:BoundField HeaderText="Class Titles" DataField="LeafName" />
<asp:ButtonField ButtonType="Button" HeaderText="Register" Text="Register"/>
</Columns>
</asp:GridView>
|
|
|
|
|
Ideally you would edit your data source before binding, by doing substrings inside your SQL. You can also iterate over the data source before binding. You can also write your column definition so that it calls a method and passes in the data source, so you can return whatever string you like based on the data.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I don't think substring will work for me because the column I am selecting has differing string lengths and from what I googled, it appears I need to know the length of the string I wish to keep. Perhaps there is a sql command I missed.
I was trying to do a while loop "while(reader.Read())", but I wasn't sure exactly how to handle the reader contents. I had assumed that since it is a reader that I cannot write to its contents. Am I wrong in this assumption? I had tried to assign each iteration of reader to a string array, but that does not appear to be the path I wish to go down. My main issue is understanding what data type is coming out of reader and what format its data must be to be accepted during databinding. So, am I right about the reader and is the table idea bad? Thanks!
|
|
|
|
|
OK, it looked to me like you wanted to drop the extension, so, the last four characters.
VengefulSakhmet wrote: I was trying to do a while loop "while(reader.Read())"
I would fill a dataset and iterate over that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You can try something like:
string queryClasses = "select left(WSS_Content.dbo.AllDocs.LeafName, charindex('.', WSS_Content.dbo.AllDocs.LeafName, 0) - 1) from ...
Instead of charindex you might want lastIndexOf kind of thing.
Please check this link: http://www.sqlservercentral.com/scripts/T-SQL+Aids/31116/[^]
Hope this will help.
|
|
|
|
|
Hi,
I have a button in the ListView ItemTemplate. If th euser clicks the button I need to hide the button and show a value instead.
Here's my code
((Button)lvID.FindControl("btnSearch")).Visible = false;
((Label)lvID.FindControl("lblDynLabel")).Text = getItem;
It gives the following error:
Object reference not set to an instance of an object.
|
|
|
|
|
WEll, your code is awful. You should never use FindControl and not check if the return is null.
Unless the getItem is generated on the server side, I'd do this with javascript. Otherwise, I'd use a breakpoint and try to work out what was going wrong. Is lvID the listviewitem ?
Since when does ASP.NET have listviews ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
protected void lvID_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item is ListViewDataItem)
{
ListViewItem item = (e.Item as ListViewItem);
Button btn = item.FindControl("btnSearch") as Button;
btn.ForeColor = Color.Red;
}
// if not set AlternatingItemTemplate you have get error.
// must be AlternatingItemTemplate delete or set.
|
|
|
|
|
Hi,
I have encountered to an ASP.NET application for first time that forced me to provide some reports in it from data that hosted in a SQL Server 2008, in Visual Studio.NET 2008(Providing data by ADO.NET). Can anyone help me by providing some quick tutorials for me?
Thanks...
modified on Friday, August 21, 2009 5:15 AM
|
|
|
|