|
you could write a small application yourself using
Convert.FromBase64String()[^]
and
Convert.ToBase64String()[^]
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
"Let me get this straight. You know her. She knows you. But she wants to eat him. And everybody's okay with this?" - Timon
|
|
|
|
|
Thanks for the idea i'll try that
|
|
|
|
|
Hi..
I'm new in asp.net. I'm not sure what is the best way to pass data to another form, change that data and back to the first page where I can see the new changed value.
Precisely,
I have Form1 with some fields. When I go to Form2, i want to see all data from Form1 and want to change that data. And then, when I back on Form1, I need to see that changed data.
My thoughts is to use session object to pass value to another form(Form2). But, if I use session, when I change data on another form I suppose I need to also change session object there to have new values, so I can see new values in first form.
Another way (not using the session) is just to use sql query(as I use in first page) and hit the DB on second page just to get the data.
Any suggestion? Maybe examples?
Thanks!
BobA
|
|
|
|
|
|
I want to create a folder named ErrorLog in Program files (where my application is going to be installed) and
But I am not able to create folder in Program file, Access is denied error fires.
Please help me
|
|
|
|
|
You have posted this on the ASP.NET forum. Does that mean you're trying to create a folder in Program Files directory from within a web app ?
|
|
|
|
|
That's a Windows security measure. While in certain circumstances I would change the folder's security settings to allow for such a thing, I would not do so with a web application - this is the asp.net forum. Rather create a different folder for your error logs with the tools which come for your web site, make it writable for the "user account" of your iis process, and write the file there.
|
|
|
|
|
It's difficult to say without any codesnippets.
I have with c# and .net experienced that folders and files are locked while traversing, or while updating file content.
Without knowing the context it's impossible to say.
I used myobject.dispose() on the file/folder-objects involved, and it solved my problems in that particular case.
But this sound like it has nothing to do with asp.net.
http://blog.kowalczyk.info/article/Getting-user-specific-application-data-directory.html[^]
|
|
|
|
|
I am an experienced programmer but a novice at ASP. Attempting a CDO email and when I click submit an HTML page appears with my ASP code listed at the top. My HTML page form begins with:
and then i have a standard form object with a submit button. for now, the entire content of aspmailform.asp code file is simply:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="myrealemailaddress@myrealemailcompany.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>
------
Any ideas what error would cause the ASP code to appear in the browser instead of running?
Thanks for your help!
- Scott
|
|
|
|
|
Wow, ASP. Thats going back a bit.
Here is an example
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
strDesc = "Message contents"
With iMsg
Set .Configuration = iConf
.To = "myrealemailaddress@myrealemailcompany.com"
.From = "mymail@mydomain.com"
.Sender = "mymail@mydomain.com"
.ReplyTo = "mymail@mydomain.com"
.Subject = "Sending email with CDO"
.textbody = strDesc
.Send
End With
Set iConf= Nothing
You may have to tweak it a little, but should work.
Make sure IIS is configured to serve ASP pages as well. I don't think IIS 6+ is configured to do so by default.
|
|
|
|
|
|
Hi,
I have an ASP.net application, which gets data from Database. In that it gets datetime from data base. In database it contains milli seconds as well. But when it comes to .Net milli seconds are removed. So when I compare these dates, they are not equal. Is these any way to hold the date time field as it is in the database and send it to another stored proc for comparision.
thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Your problem more look like conversation of date time from database to your .net application. Please check how you fetching value from database to .net application.
|
|
|
|
|
Try using in this format :
ddMMMyyyy HH:mm:ss.ff
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Hi there
I'm looking for the an answer for this:
why "myFlickr.UploadPicture("C:\h.jpg")"
the value is nothing, that path is rigth. So when I stop the VS.net it take a few seconds, and the Autenticated is True. I guess the Apikey and the Secret y rigth.
any idea?
Saludos
|
|
|
|
|
HI THERE
This was very simple to fix it.
FILEUPLOADER.SAVE("C:○\H.JPG").
Then I use de file in the path of server, that's all for this.
Saludos
|
|
|
|
|
I am create crystol report in asp.net in visual studio 2010 but crystol report toolbar Print Button Not working in Google chrome brouser
How to fix this error.
|
|
|
|
|
|
I am trying to get the value of a textbox once the user clicks the submit button.
I can get it using the following code but is there a better way? It makes no sense to me to actually view the source code to get
ctl00$ContentPlaceHolder1$DailyReceipts1$rpt_Ticket$ctl01$rpt_TicketDetail$ctl01$txt_qty
instead of coding to get it. Any help will be appreciated.
CODE in FRONT
<asp:ImageButton ID="imb_EditDetail" runat="server" AlternateText="Update Receipt" ImageUrl="edit.gif" OnClick="Update_TicketDetail" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="imgEditDetail"
PopupControlID="pnl_EditQty"
BackgroundCssClass="modalBackground"
DropShadow="true"
OnOkScript="ok()"
CancelControlID="Btn_CancelEdit" />
<asp:Panel ID="pnl_EditQty" runat="server" CssClass="modalBox" Style="display: none;" Width="300">
<asp:Panel HorizontalAlign="Center" ID="Panel2" runat="server" >Edit Quantity</asp:Panel>
<asp:Label ID="lbl_Name" runat="server"></asp:Label><
<asp:TextBox ID="txt_qty" runat="server" ></asp:TextBox>
<asp:Button ID="Btn_Edit" runat="server" Text="Edit" Width="55px" OnClick="Btn_Edit_Item_Click" CausesValidation="true" Itm_idx="" ticket_idx="" history_idx="" old_qty="" Control_id="" />
<asp:Button ID="Btn_CancelEdit" runat="server" Text="Cancel" Width="55px" buttonAction="submitButton" />
</asp:Panel>
CODE BEHIND
protected void Btn_Edit_Item_Click(object source, EventArgs e)
{
string id = ((Button)source).CommandArgument.ToString();
string idx = ((Button)source).Attributes["Itm_idx"].ToString();
string ticket_idx = ((Button)source).Attributes["ticket_id"].ToString();
string history_idx = ((Button)source).Attributes["history_id"].ToString();
string oldQty = ((Button)source).Attributes["old_qty"].ToString();
string controlID = ((Button)source).Attributes["Control_id"].ToString();
string detail = ((Button)source).Attributes["detail"].ToString();
string itemQtyEdit = Request.Form["ctl00$ContentPlaceHolder1$Daily" + detail + "1$rpt_Ticket$ctl" + controlID + "$rpt_TicketDetail$ctl0" + idx + "$txt_qty"].ToString();
}
modified on Monday, February 28, 2011 8:14 AM
|
|
|
|
|
First, please format any code snippets you post using the "code block" toolbar item. This improves the readable and increases the chance you will actually get an answer. Read this[^]
Second, read some books on ASP.NET and C#.
string idx = ((Button)source).Attributes["Itm_idx"].ToString();
This is a useless conversion as Attributes are already strings and ToString() is a waste of processor cycles.
ctl00$ContentPlaceHolder1$DailyReceipts1$rpt_Ticket$ctl01$rpt_TicketDetail$ctl01$txt_qty
This is the clientId of the control in question and is not how you access a control in the code behind. You simple use the ID, txt_qty in this case. You certainly don't access it via the Form property.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks but I cannot access txt_qty unless I use the Form property. Trust me, I would love too. Can you point me on the right direction?
|
|
|
|
|
Robert Espindola wrote: I cannot access txt_qty unless I use the Form property
You will have to explain this further. ASP.NET server controls are accessible by their IDs in the code-behind. Have you started with a sample, just a simple form?
BTW, you can edit your original post to format as I have suggested.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i would simple add the values on the session or on the hidden field that can be updated on the click of your submit button.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I'm fairly new to dependency injection but it seems like a proper DI implementation will be fairly complex.
For example, DI requires a centralized class that manages the configuration and resolves the dependencies at runtime.
DI is also based on the concept of using interfaces. For example, a SpecialLogger should use an ILogger interface.
The centralized DI manager class will need to register types - for example, associate ILogger to SpecialLogger.
SpecialLogger will also need to implement the ILogger interface so SpecialLogger can be used through the DI ILogger interface.
Therefore, it seems like a sln using DI will need multiple projects to support DI. Here is an example for logging:
* MyCompany.MyDivision.Framework.DI.Management - this would have the DI manager where dependency types are registered and resolved at runtime
* MyCompany.MyDivision.Framework.Logging - this would have the implementation of a logging class. The main logging class would need to implement ILogger.
* MyCompany.MyDivision.Framework.DI.Interfaces - this would have the ILogger interface.
Interfaces would need to be stored in a separate class library from the DI manager because both the DI manager and SpecialLogger use the ILogger interface. Since the DI manager associates SpecialLogger to ILogger a circular reference would be encountered without a separate class library to store the ILogger interface.
Does this sound like a reasonable assessment? Like I said I am just learning DI so if you can share any real-world experience with a DI implementation that would be appreciated.
|
|
|
|
|
The DI framework is usually a component of the application layer (in my experience) e.g If you had an ASP.NET MVC App and you were using structure map, its your front end application that would reference structure map, the rest of your code below that stack does not need to know about the DI container becuase its dependencies would be resovled by the main application (E.g MVC)
Then the rest of your dependencies etc.. you could seperate the interfaces from the concrete classes, but I would only do that when its required. You could start with a simple MyCompany.MyDivision.Framework.Logging project that contains the ILogger and the SpecialLogger.
Becuase the DI container is just references in the top of the stack (e.g the MVC app) it already has references to the components below it, so no circular reference is created.
If you find yourself reference the DI container lower down the stack then you may run into problems, there are usually more specific services you can implement for resolving things the DI container could provide.
e.g Lets Say you had the Logging assebly, a Domain Layer assembly, and a front end project, and the requirements where for the front end project to have references to the domain layer and logger, but you dont want interdependencies between the two:
Then lets imagine you had a bunch of repositories that needed resolving in your domain data access layer, that could be a IRepositoryRegistry interface, but it could be implemented in the app up the stack to look at the DI container to return a repository. There would be no need for your logging assembly to ever use IRepositoryRegistry, so you don't end up with dependencies between those sort of assemblies.
James
James Simpson
Web Solutions Developer
www.methodworx.com
|
|
|
|