
mRbLACK
Avatar/Signature-
Posts
26 -
Joined
-
Last visited
About mRbLACK
- Birthday 05/01/1980
Personal Information
-
Occupation
it
mRbLACK's Achievements
Newbie (1/14)
0
Reputation
-
nope doesnt work, im not sure if maybe asp tags have different attribute names or something? its very odd because it works if you dont dont do it programatically?
-
OK this is such a small thing why is it so hard!! an ASp:label control how can i center align the text from the .vb code... if you do it on the control itself its easy.. <asP:label style='text-align:center;' blablabla /> sorted its works fine but as soon as i try do it from code it doesnt work? does any one know how to do this? have tried alot of ways... lblError.Style("text-align") = "center" lblError.Style("textalign") = "center" lblError.Style("align") = "center" once again...HEEELP!! :D
-
Thanks I think that is going to help me alot, the only thing though is that when I check that value, If I havent yet added that control its empty? I think I can use it indirectly though so thatnks loads...:D
-
ok think ive kinda found the solution, when the onload of my cell fires, check for isPostback, if it is then i add the same controls (the new email/contact oneS), even though they have been initialized, and they contain all their values and their events fire off...this makes no sence to me so if anyone can explain thatd be shweet, though it works. :D oh and if anyone knows how to get which control fired the postback thatd be very helpfull :D
-
just for clarification... like i said the onload of the cell populates itself with stuff, i replace this with the fields for the email details...these fields are created at run-time so i go something like... Protected WithEvents txtMessage As New System.Web.UI.WebControls.TextBox replacing the origonal contents of the cell with the new controls, NOW when i post back, those fields are no longer there...which sucks, should i be using viewstate for this? or shouldnt i be doing it like this at all? surely I can catch the click of the Send button and get the field values before the fields are cleared? Im not sure im making sence... help
-
HI there, In struggling a bit with isPostBack and hoping someone can help, I'm doing a contact (email us) section on a web site. You click on a web control (link button) and in its control.click event I insert the buttons, text boxes etc. into a cell on the same page. One of these new controls is obviously a button, now this also has an control.click event BUT i never actually hit it, heres why i think...when you click the button, the page reloads, the cell contents are then replaced with its ORIGONAL content (because the onload of that cell reloads its content) SO when it comes into the onload of that cell, I would like to capture, the isPostback, and see which control origonated the postback, how do i do that?
-
ok this might be a long one but should be interesting enough... im building a function that generates a table populated with text and web controls (buttons/textboxes...) these have been declared at the top of my page already for use on the page, they have events of their own etc.... Protected WithEvents tdRightBar As System.Web.UI.HtmlControls.HtmlTableCell Protected WithEvents txtSearch As New System.Web.UI.WebControls.TextBox Now this table that is generated is made as a stringbuilder then added to the tdRightBAr as we go along, so build the <tr><td> tags add text etc. then add to the panel as a literal control oPanel.Controls.Add(New LiteralControl(sTable.ToString)) then i would add the txtSearch control or whatever usually like this... tdLeftBar.Controls.Add(txtSearch) which would work fine...except that now im passing all these values in an array to a fucntion which is then supposed to add them...but when it gets into the funtion and adds them for some reason it wont add the controls, im assuming becuase the array doesnt hold a reference to the actual controls but makes it of same type (which doesnt carry the events etc. of my declared ones...) so the question is how can i add the controls/ pass them in such a way that it does keep the reference to my declared controls and not try add add some fake control of same type heres some more code i know its kinda confusing... '-- Building array / sending to function... Dim oValues(2, 1) As Object oValues(0, 0) = "Search" '-- Some text oValues(1, 0) = "Keywords" oValues(1, 1) = txtSearch '-- Controls oValues(2, 0) = btnSearch AddDynamicTable(oValues, tdLeftBar) '-- Send which panel to add to '-- Receiving Function and adding code... Private Function AddDynamicTable(ByRef aValues(,) As Object, ByRef oPanel As System.Web.UI.HtmlControls.HtmlTableCell) Dim sTable As New System.Text.StringBuilder Dim i, j As Integer sTable.Append("<table class='tblFunction' cellpadding=0 cellspacing=0") For i = 0 To UBound(aValues, 1) sTable.Append(sOPENROW) For j = 0 To UBound(aValues, 2) If (aValues(i, 0) Is Nothing And Not aValues(i, 1) Is Nothing) Or _ (Not aValues(i, 0) Is Nothing And aValues(i, 1) Is Nothing) Then sTable.Append(sOPENCOLSPAN) If aValues(i, j).GetType() Is System.Type.GetType("System.String") Then sTable.Append(aValues(i, j)) Else oPanel.Controls.Add(New LiteralControl(sTable.ToString)) oPanel.Controls.Add(aValues(i, j)) sTable = New System.Text.StringBuilder("") End If j += 1 Else '---- Bla Bla Bla, the rest is basically the same as above... Thanks for any help in advance :p
-
Hey guys, What im trying to do is on the click of a button, set the innerHTML value of a cell. Now I want to do it on the server side, so onclick of asp:button calls function which gets rerence to the htmltablecell and changes its values... obviously I havent been succesfull yet and was wondering if any one knew how to do this... this is some of what ive tried so far... Protected tdSpecial As System.Web.UI.HtmlControls.HtmlTableCell tdSpecial.innerHTML = "sadfasdf" & sDBContent HELP! :eek:
-
HI Ive created a custom error page to obviously capture errors that occur...BUT theres a couple more things i would like to do and am struggling to find info on (decent info anyway) 1) How do i capture the error type in that custerror.aspx page to display appropriate message? 2) if a incorrect link like to an .htm file that doesnt exits occures, the error isnt fired, how can i also customise it to catch none, aspx errors? thanks loads for the help...
-
hey thanx for the help, well what has happend since then is that ive been able to use <impersonate /> with some success, i tried to creat a new user, gave them access to all the folders that i though nesecary BUT it still didnt like that user, what i did was add a new user to the Admin group which it loves (works well with), however im a bit wary about that one... so not sure why when i create a seperate user it doesnt like it. even though (and i checked) it has access,to the app. folders....? :D
-
Hey chaps OK I'm deploying my web site onto server only to realize that its throwing errors because the web site is writing a file to a specific directory for the site menu. I know that you can emulate System users, and maybe grant write access for that specific directory? Can anyone tell me how to do this? thanks for all the help :D
-
Hi guys Ok this might not technically be a .net question (im using standard ASP) but was hoping you could help on the CDONTS part. Previously I could send emails from my machine (win2000serv) without any problems from my ASp code. Somewhere along the line it stopped working, maybe from something i installed or something. but i really need to be able to send mail vie, cdonts smtp... does anyone know if i can reset it or something to that affect? not just stop and start it but actually get it back to how it was before i messed it up. or if any one has ever had this problem? thanx regards G :confused:
-
ok not sure i understand but thats ok 1) If in my items (in the html) i add "seleted" into one of the tags then, that value will always come through i.e. That one is selected (Works correctly in code) BUT if i dont pre-select anything (as it were) then even though I select something on the page, when in code it comes though as -1 (instead of 2 or whatever) So maybe somthing to do with how that firing off? (just a thought, dont know) 2) So is it or isnt it working on your side? 3) What should the values etc. on the top of my page and all that be? <%@ Page Language="vb" AutoEventWireup="false" Codebehind="search.aspx.vb" Inherits="blabla.search"%>
-
its all above, I'm coding the buttons straight in the html, and my checking code is also above, .selectedindex... etc. or .selectedvalue but its always -1 etc. bleak i know, youre probably thinking, but what on earth could be wrong its so simple...me too.....me too..... restfull sleep = large hammer + computer
-
damn, I was hopefull on that one, added if not isPostBack in function but alas no such luck the rdAdvanced.SelectedIndex is still always -1....unless I'm using the isPostBack wrong? I'm thinking checkboxes are the way forward, tho one day on my death bed I know this will come back to haunt me... Public Sub StartSearch() If Not IsPostBack Then blablabla...