Jump to content
Xtreme .Net Talk

hrabia

Avatar/Signature
  • Posts

    107
  • Joined

  • Last visited

Everything posted by hrabia

  1. That's the simplest way (without registration in web.config and IIS) to build and use your own http handler ("redirect request to your own class").
  2. Sad but true... Thanx anyway. Have you heard about plug-ins that do that?
  3. Anybody knows? It's something curious to write *.cs file (for intellisence) and than to chage the name to *.ashx :confused:.
  4. That's ASP.Net question :-). I'd like to have login page with behind system that authenticates users using AD or my database infos.
  5. http://aspalliance.com/das/passingdata.aspx
  6. My Customer wants to have possibility to autheticate user thru Active Directory, but also he has some suppliers that have not any Windows account and they shoud also be able to use my application. How can build one account system for both types of users? Greets Adam
  7. obj.GetType() - I got errors when I used this function. I think it shoud be overriden.
  8. Hmm, I use only [XmlElement] for properties. It has worked fine until inheritance...
  9. I have one base class. This class is used as parameter for method that serializes an object of that class to xml (using XmlSerializer). class Base {.......} class X { public void Serialize(Base obj) { XmlSerializer _o = new XmlSerializer(typeof(Base)); ................... } } I have second class that derives from base class. class Second : Base {.......} When I use object of second class as parameter for my method I need a type of my object for constructor of XmlSerializer(typeof(Second)). Serialize(new Second()); But my method know only type of base class, and only XmlElemnts of base class are serialized. How can get this type dynamicaly?
  10. You can use ItemCreated event and check if e.Item.ItemType = ListItemType.Header
  11. dim ri as RegionInfo = new RegionInfo("JP") Label1.Text = format("Symbol: {0}", ri.CurrencySymbol)
  12. Try with <globalization> tag and "culture" attribute in web.config
  13. Yes, you can reuse DataAdaptor. Every DA has four command objects (for select, insert, delete and update) which can be modifided.
  14. Hi WebJumper. When uploading and convertig file to bitmap you don't have to save your file on server, because this file "comes" as a stream. Than you can create a bitmap directly from that stream (one of the overloaded constructors).
  15. You can NOT set <authentication mode="Forms"> in location path. This can be done only at main level. What you can do is to set <authorization> tag. That means, you are setting authentication mode for whole application but you can allow or deny users (or groups) at any level individually. I've copied your <authentication> tag back to root web.config (leaving authorization) and your file works fine.
  16. You have to break your application into subdirectiories. Each of them can have its own web.config or you can specify security settings in main web.config file using <location> tag e.g.: <location path="admin"> <system.web> <authorization> <deny users="?" /> </authorization> </system.web> </location>
  17. What type of data object do you bind to the grid: DataSet or SqlDataReader?
  18. Show your code. Are you using Oracle.DataAccess.Client.OracleConnection object for connection?
  19. Check in Oracle Net Manager your service names. The message means that your Data Source=abc is invalid and has nothing to do with ADO.Net. I use this client without problems.
  20. You have to read a little bit how asp.net events work :D Belive me that I'll do the same thing with data binding and this event fires for each row (not only that).
  21. You have to declare your object in global.asax <object id="MyConnection" class="System.Data.SqlClient.SqlConnection" runat="server" scope="Application"></object> Than you can use it in following way: Dim moConn As System.Data.SqlClient.SqlConnection moConn = CType(Application.StaticObjects.Item("MyConnection"), System.Data.SqlClient.SqlConnection) BTW: It is VERY BAD idea having Connection object as global object. Because of connection pooling it is much better to create, use and destroy (close) connection to database as quickly as possible.
  22. You have to do it in grid's ItemCreated event. I've made it for my dgPhotoGrid: Private Sub dgPhoto_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgPhoto.ItemCreated If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then Dim _butDelete As Button = CType(e.Item.Cells(3).Controls(1), Button) _butDelete.Attributes.Add("onClick", "return(confirm('Are you sure to delete this photo?'));") End If End Sub
  23. For dim str str = "HELLOEESDFA" you cannot use <script> tag. You have to use <% %>.
  24. Label1.Visible = true works fine in Page_Load event so try to debug your code and find out why your check variable has always true value.
  25. hmmm :) You have to probably read a litle bit about events in ASP.Net. Some things you can do only on client ("Do you realy want to delete?" - message :D - javascript etc.) and some only on server (Connection.Open :D).
×
×
  • Create New...