|
what is page tag and register tag in asp.net? also difference between both?
|
|
|
|
|
Page tag is the mandatory tag for an aspx page. It is used for setting some attributes like codefile etc. A page will not render without it.
Register tag is used for registering user controls. Whatever user control you will be using on the page you have to register it using register tag.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hello,
I'm pondering the use of threading in my asp.net application, and would sure like some input from you guys.
Upon a succesful login, details about this login must be written to a database. In itself an operation which has no influence on the application per se. So as to not slow the app down, I'm considering sending this to a thread of its own, as I anticipate a hefty run on the application throughout the two weeks it will be up. Would this make sense to ship off to a seperate thread - or would there be too many complications (such as a maxed out threadpool) deriving from this?
I'm not big on threads in asp.net, but hopefully some of you are, and have a piece of advice for me.
Thanks in advance,
Morten
|
|
|
|
|
I would like to know why do you want to save the details of login. If it is for reporting purpose ( who has logged in since date so so) then i would like to say that rather then making another query to the database for saving the details and making a thread, you should do the following.
Query the database for username and password (through a stored procedure) if they are valid (successful login) insert these details in the table you want to save (in the same procedure0 and then return to redirect the user to the successfull login page.
Hope it solves your problem.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hello Ahsan,
it is indeed for purposes of reporting. I think you indicated the better way to go; thanks for your input.
Morten
|
|
|
|
|
I have a web app that has a number of class library projects (which have the business logic). Currently, these class libraries each have a Settings.settings file to contain application settings (like feedback messages and format strings). During runtime i want to be able to go onto the server and change the value of one of the settings.
Essentially I want what is currently available for the web project - it has a Web.config file which has all the application settings. I am able to change these settings during runtime.
|
|
|
|
|
Use the app settings in your web config instead, and use HttpContext.Current ( from memory ) to read those values.
Nope, completely wrong.
WebConfigurationManager.AppSettings("ConnectionString") for example reads
<appSettings>
<add key="connectionString" value="Data Source=xxx;User ID=sa;Password=yyyyy;Initial Catalog=zzzz"/>
</appSettings>
from a dll in my project.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi,
Thanks for your reply.
Do you mean the Web.config file in the website?
That is what i will resort to if I can't get my way, but I was hoping to still be able to use Settings.settings or something similar in the Class Library (not something in the website).
|
|
|
|
|
Hi All,
When im trying to add a .DAT or .mp3 files using a HTMl file upload control, the page is showing or redirecting to the page with information "Page Can not be found" .please help me out to solve it.I dont knw what exactly the problem.When im uploading .txt or .doc or image files its working properly.I want a file upload control which can upload all type of files(.jpg,.txt,.doc,.mp3,.dat,.wmv and all )
Thanks in ADvance
|
|
|
|
|
There is only one file upload control. EVER. You realise that, right ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Don't use words like urgent in your post or subject line. That's just flat out rude.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I especially love when it's not so urgent for them to bother replying to people who try to help.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Yeah, I figure those types are ones who put out their inquiry and hope for an instant answer. After all, isn't the Internet supposed to be instant information at one's fingertips
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I'm just curious what it is they do, if they don't repost, for them to be gone and not willing to respond ? I think it's more the case that I tend to ask questions they can't answer so they sit tight for code they can copy and paste.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
this is my repeter code
<asp:Repeater ID="rptrr" runat="server">
<HeaderTemplate>
<table>
<tr>
<th>
Language</th>
<th>
Description</th><th>Title</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label runat="server" ID="Label1" Text='<%#DataBinder.Eval(Container, "DataItem.res_Language").ToString() %>' />
</td>
<td>
<asp:Label runat="server" ID="Label2" Text='<%#DataBinder.Eval(Container, "DataItem.res_Description").ToString() %>' />
</td>
<td>
<asp:Label runat="server" ID="Label5" Text='<%#DataBinder.Eval(Container, "DataItem.res_Title").ToString() %>' />
</td>
<td >
<a href="EditResources.aspx?id=<%#DataBinder.Eval(Container, "DataItem.res_ID").ToString() %>">
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon_edit.gif" /></a>
</td>
<td >
<asp:Image ID="Image2" runat="server" ImageUrl="~/Images/icon_delete.gif" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
please let me know the code to delete a row from the repeater whn im clicking on the image button "delete"
|
|
|
|
|
Well, obviously, an image won't to it. An imagebutton, on the other hand....
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi guy i have this problem
When i am working in my own pc. I have not problem converting from String to dataTime
using this code
Convert.toDateTime(TextBox10.Text).toString("MM/dd/yyyy") and it seem fine with it. But when i transfer to server side. This error occur later. I am using ASP.net 2.0
Any reason or tips to resolve this error?
Thanks Guys
KaKaShi HaTaKe
|
|
|
|
|
Gee - it's urgent. Great.
Probably your locale settings differ, so 12/20/2008 is a valid date on one and not the other.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Ok so u mean i have to go to the regional and language setting in the control panel to do the time setting to MM/dd/yyyy?
KaKaShi HaTaKe
|
|
|
|
|
yes. And write code that catches that exception and tells the user their date is not valid, and tells them what format to use.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
But Bro i have set the regional setting to the (dd/MM/yyyy) in the server as well
how come still cannot?
KaKaShi HaTaKe
|
|
|
|
|
If they are both the same, then it makes no sense at all, assuming the input is the same. Have you written code to tell you what the string is that won't parse ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Ya.... In the GUI in display 31/08/2008 in textbox
then i do the convert.toDatetime("31/08/2008").toString("MM/dd/yyyy")
They say the string is not recognized as a valid DateTime in the server but in my local host work prefectly fine bro
KaKaShi HaTaKe
|
|
|
|
|
OK, so there is a setting different between the server and the client.
Why are you performing this operation at all ? Why are you asking for DD/MM/YYYY and then converting to MM/DD/YYYY ? Why not have seperate text boxes to make it clear which is which, then build a datetime from that instead of relying on the server settings ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
But bro something the server work but sometime the server don't very weird right?
KaKaShi HaTaKe
|
|
|
|