|
Just go through this link
http://www.dotnet-guide.com/save-image-in-sql.html[^]">
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hi,
I have two custom metadata columns for Document Library, when ever uploading a document or creating new document in the document library, have to fill the metadata columns,
in this, my both metadata columns are choice types, when ever i select an option from the first choice based on this the second metadata column should populate values based on the selection
i mean
First metadata column having the values like
1
2
3
...
The second metadata colum should populate the values based upon the previous value selected from the first metadata column,
can any one come across with the same situations, please let me know or any suggestions.
Thanks
Modiyam
Modiyam
|
|
|
|
|
I am trying to access my linksys router's, web configuration to parse out my WAN ip address. However, I can't seem to get the Credentials to work correctly. I think the problem is that I am not passing the credentials first, and then trying to access the web pages. Here is the code I am using.
Dim request As System.Net.HttpWebRequest
Dim response As System.Net.HttpWebResponse = Nothing
Dim MyCredentialCache = New System.Net.CredentialCache
Dim ds As DataSet
Try
request = DirectCast(System.Net.WebRequest.Create("http://10.100.200.1/RouterStatus.htm"), System.Net.HttpWebRequest)
MyCredentialCache.Add(New Uri("http://10.100.200.1/RouterStatus.htm"), "Basic", New System.Net.NetworkCredential("", "thepassword", ""))
request.Timeout = 60 * 1000
response = DirectCast(request.GetResponse(), System.Net.HttpWebResponse)
ds = New DataSet()
ds.ReadXml(response.GetResponseStream())
Catch ex1 As System.Net.WebException
Debug.Print(ex1.Message)
Catch ex As Exception
Debug.Print(ex.Message)
Finally
If Not response Is Nothing Then response.Close()
End Try
I keep getting an Authentication Failed error 404 when attempting the response = directcast.....
Any help would be greatly appreciated!
|
|
|
|
|
Ryan Fleming wrote: MyCredentialCache.Add(New Uri("http://10.100.200.1/RouterStatus.htm"), "Basic", New System.Net.NetworkCredential("", "thepassword", ""))
What is the reason behind leaving userid blank ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
The linksys router only uses a password, no username. When I access the web config pages using a browser, I always leave the username blank. Although I can use a username and the router ignores it. I have tried in the code to pass a username, but still get the 404 error.
|
|
|
|
|
hi,
I want to recognize the fact that a page is allready loaded in order to start counting time to close it and redirect to another page.
I tried the "Protected sub Page_LoadComplete" but with no luck
The page (index.aspx) has in it a SWF file using flash control.
thanks
Dov
|
|
|
|
|
I open my site with index.aspx page that is lodged in master page. this page hase inside a SWF control a SWF file. when the time line of the SWF reaches 30 seconds I would like it to change to Default.aspx which is also lodged in the same master page. I don´t know what action I should use
Dov
|
|
|
|
|
I suspect your best bet is to have your swf redirect you to another page. ASP.NET cannot interact with your swf. I don't know if javascript can.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I want to send email from local host. I have setuped IIS and SMTP sevver.And configure the Default SMTP Virtual Server w.r.t "Email System Using ASP.NET" and other codeproject articles.
Then I debug the cobe and I gave Following information
From:127.0.0.1
To :shahdat45ict@yahoo.com
Subject:afsd
cc:fs
Bcc:ad
After that, I Clicked on send botton
Level show Your email has been sent successfully-Thank You. But actually massage could not send. What can I do?
shahdat
|
|
|
|
|
MD. SHAHDAT HOSAIN wrote: But actually massage could not send. What can I do?
Double check IIS. Is it actually pushing the emails out on the internet, or is it just storing them somewhere. You'll have some folders in C:\inetpub\... somewhere for the SMTP server (if you are using the default configuration). Are your emails in there?
You could also show us your code. It might be giving a false positive.
|
|
|
|
|
Yes, Two mails were be stored in C:\inetpup\mailroot\queue; and another two mail in C:\inetpup\mailroot\drop;
following code was be used
private void SendMail()
{
try
{
MailMessage Email=new MailMessage();
Email.To=txtTo.Text;
Email.From=txtFrom.Text;
Email.Cc=txtCC.Text;
Email.Bcc=txtBCC.Text;
Email.Subject=txtSubject.Text;
Email.Body=txtMessage.Text;
Email.Priority=MailPriority.High;normal
Email.BodyFormat=MailFormat.Text;
//Checking whether the attachment is needed or not.
if(rbtnAttach.Checked)
{
Email.Attachments.Add(new MailAttachment(FileBrowse.Value));
}
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
SmtpMail.Send(Email);
Reset();//calling the reset method to erase all the data after sending the mail.
lblMessage.ForeColor=Color.Navy;
blMessage.Text="*Your email has been sent successfully-Thank You";
}
//Catching Exception
catch(Exception exc)
{
Reset();
lblMessage.Text="Send error:"+exc.ToString();
lblMessage.ForeColor=Color.Red;
}
}
Note: What's address should be provided in From: text box?Is essential or not?
How can I check IIS send is pushing the emails out on the internet?
Please keep me
shahdat
|
|
|
|
|
MD. SHAHDAT HOSAIN wrote: Note: What's address should be provided in From: text box?Is essential or not?
Here You Go
MD. SHAHDAT HOSAIN wrote: How can I check IIS send is pushing the emails out on the internet?
You can have a look on SMTP response code.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
According to Ur suggestion I applied following code. Output show Msg sent successfully. Actually never it is sent to destination. Messages are only push to C:\inetpub\mailroot\queue;
1.I think IIS can not push the emails out on the internet.How can I look on SMTP response code.
2.I want to send emails from localhost. Now I confused how it possible sending a mail from anonymous mail address like "shahdat_mbstu@yahoo.com" through localhost, bcoz there no relation between my localhost and my mail address "shahdat_mbstu@yahoo.com". ;
3. Please help me!;
public void CreateCopyMessage(string server)
{
MailAddress from = new MailAddress("shahdat_mbstu@yahoo.com", "Ben Miller");
MailAddress to = new MailAddress("shahdat45ict@yahoo.com", "Shahdat Kooras");//jane@contoso.com
MailMessage message = new MailMessage(from, to);
// message.Subject = "Using the SmtpClient class.";
message.Subject = "Using the SmtpClient class.";
message.Body = @"Using this feature, you can send an e-mail message from an application very easily.";
// Add a carbon copy recipient.
MailAddress copy = new MailAddress("Notification_List@contoso.com");
message.CC.Add(copy);
SmtpClient client = new SmtpClient(server);
// Include credentials if the server requires them.
client.Credentials=
client.Credentials = CredentialCache.DefaultNetworkCredentials;
Console.WriteLine("Sending an e-mail message to {0} by using the SMTP host {1}.",
to.Address, client.Host);
try
{
client.Send(message);
lblMessage.Text = "Message successfully sent";
}
catch (Exception ex)
{
Console.WriteLine("Exception caught in CreateCopyMessage(): {0}",
ex.ToString());
}
}
shahdat
modified on Tuesday, April 14, 2009 11:09 AM
|
|
|
|
|
string SmtpServerIP = "UR SMPTP IP";
if (SmtpServerIP != "")
{
SmtpClient smtpClient = new SmtpClient(SmtpServerIP);
smtpClient.Send(Email);
}
|
|
|
|
|
hello,
i need to create a form which will submit the content to an outer file like xxform.asp
the problem is that if i try to do it the form won't work. it will not submit itself to the file.
thats because it is nested inside a different form and/or is declared as runat=server
is there a way to make this happen?
will IFRAME work ?
i need the aspx functionability as well because i want to read info from a database and put it as part of the posted form , thats why i cant get rid of the outer form.
thanks in advance
avi
|
|
|
|
|
This is the ASP.NET forum, this is an asp question . Try the web dev forum. Or better yet, don't use ASP, it sucks.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
well my friend this is an ASP.NET question because i am using an ASP.NET page and from it i need to submit a form to other page.
but since ASP.NET creates its own form for its purposes i cant build my inner form for the submit purpose.
any suggestions?
i heared AJAX can solve this but i am not familiar with it
tnx,
avi
|
|
|
|
|
Hello,
I am writing an engine for a forum. Now I have stumbled upon some problems with caching. I have a board view with multiple threads printed and each
one has a first few replies added. Now I decided I want to have caching not based on timeout but on custom action. When a user uploads some reply, only
then should the page expire from cache. It is also desirable to expire only those versions of pages that need to be expred (based on query string parameters).
let's say I have this situation:
so http://forum/index.aspx?page=1 cached
so http://forum/index.aspx?page=2 cached
so http://forum/index.aspx?page=3 cached
so http://forum/index.aspx?page=4 cached -> reply happes
so http://forum/index.aspx?page=5 cached
so http://forum/index.aspx?page=6 cached
.. pages 1 - 4 must expire from cache. The rest should stay in cache. Also I do not want any of the pages to expire from the cache before this action
for whatever reason this could happen. Please help me with this.
for now I have written in page load of index.aspx this:
1) in global.asax, Application_Start:
HttpRuntime.Cache.Insert("all", DateTime.Now);
2) and in my index.aspx page load event this:
Response.AddCacheItemDependency("all");
Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
Response.Cache.SetExpires(DateTime.Now.AddMinutes(5));
Response.Cache.SetValidUntilExpires(true);
//Response.Cache.VaryByParams["page"] = true;
3) then if I want to reset all pages dependend on key all, I call index.aspx with query string parameter ccreset and again
in global.asax Application_BeginRequest I check for this query string parameter and modify key all to invalidate cache like this:
HttpRuntime.Cache.Remove("all");
PROBLEMS
________
A) Even without trying to invalidate my cache, page output caching occurs only if I do not specify VaryByParams. As fast as I add this line of code:
Response.Cache.VaryByParams["page"] = true;
caching stops. I print a timestamp on the page to see this. I do not understand this. Problem is exactly the same if I use the declarative syntax inside
aspx page.
B) Let's say I forget about the VaryByParams, caching works out of the box, time stamps printed on my page confirm this. But, even when I modify the
"all" key in my cache hoping to initiate cache invalidation nothing happens. All pages remain in the cache as nothing happened. Why is that?
QUESTION
_________
I would like to understand why B) happens and also what is up with A). But please, if I should be doing this thigs some other way feel free to skip
answering me my first two questions and just explaing to me what is the easiest and most straight forward way to achieve what I want.
Thank you for your replies in advance
Andrej
|
|
|
|
|
Hi,
After some research, I get this code, and it's pretty much the page I need
<asp:GridView ID="gr" runat="server" GridLines="Horizontal"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="bc" HeaderText="Código de Barras" ReadOnly="True" />
<asp:BoundField DataField="produto" HeaderText="Produto" ReadOnly="True" />
<asp:TemplateField HeaderText="Preço Caixa">
<ItemTemplate>
<asp:TextBox ID="txtPC" runat="server" Text='<%# Bind("pc") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
How do I make the SelectedIndexChanging event to get fired without clicking a "edit" button? or any event at all from changing or leavind the txtPC
Thanks,
Dirso.
Thanks,
Dirso
|
|
|
|
|
<asp:GridView OnSelectedIndexChanging="GridViewSelectEventHandler" /> for further help see here[^]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
The problem is that the event is not fired when I press tab or enter, since I didn't click the "Edit" button (I don't even have one).
Thanks,
Dirso
Thanks,
Dirso
|
|
|
|
|
Dirso wrote: The problem is that the event is not fired when I press tab or enter
I don't know if this is possible through asp.net. You may have to write javascript code to handle this situation.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
I thought about it actually. But I have no idea how. I could create an onexit event for textbox easily, but how to assign it to the gridview row index?
Thanks,
Dirso.
Thanks,
Dirso
|
|
|
|
|
|
Hi all.
I'm fairly new to WebServices etc, so go easy on me if this is a really easy question to answer Also, I hope I posted this in the right section..
We're doing work for a customer of ours for which we consume they're webservices. We want to do some testing in-house here before testing in the production environment, and would like to create a working webservice, using they're WSDL definition.
I've poked around on google, and found some steps to create a web-services proxy, but is this the same thing?
There are quite a few methods in the WSDL, it would be painful to have to define each of them manually.
Any information you could forward, would be helpful.
Hope the Easter bunny was good to everyone.
|
|
|
|