|
Thanx for the reply Christian.
As I said before I am new t ASP.ET. How do I use the debugger and what is a delegate?
Andy
|
|
|
|
|
Well, it seems you're in way over your head.
1 - you set a breakpoint with F5, then the program stops at that point and you can step through to see what happens
2 - as you don't know what a delegate is, I assume you copied and pasted this code, which by itself, can never work. A delegate is a function pointer. Your code tries to call a delegate to do the actual search., and if you didn't hook one up, no search will occur.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanx for the advice Christian.
Yes I think I am in over my head.
I have just been learnig asp.net. Everything is working fine and I just need to be able to do a search by entering text and displaying the results in a gridview but thanx for the help
Andy
|
|
|
|
|
All of this code is far too much - all you need is SQL to do the search and take the search term, and then to call that SQL to get the result to bind to your grid.
So a stored proc that takes a parameter and that's the search term, then use that if you have a search term or if you do a LIKE search, then it will work even if the string is empty.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi;
i am doing a home automation project, through which i am controling home appliances with a PC(Serial port[microcontroller circuitry]), i want the Pc at home to be accessed remotely so that i can remotely send on/off commands on the "serial port" of the pc at home so how can it be done?
fahad
|
|
|
|
|
Definately not using ASP.NET. Perhaps using a webservice ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You are in Wrong Forum
|
|
|
|
|
Hey guys..
I have a dropdownlist and , depending on the selected item , i want to dynamically add some textboxes and labels.
The labels are not a problem , but i can't retrieve the text from the textboxes . I read that they should be initialized
in Page_OnInit , but it does not work (or i'm wrinting the wrong code) .
Can you please tell me what to do , and if it's about the Page_OnInit , can you just show me a piece of code using it ?
Thank you !
|
|
|
|
|
TerRO_GirL wrote: I read that they should be initialized
in Page_OnInit
You read that where? When you are working off articles or examples and have a question relating to that work, post a link to it along with your question, so we can see what you are attempting to understand.
led mike
|
|
|
|
|
i don't find that relevant . I would google it right now , but a snail would be much faster than my internet connection right now . There are forums and hints saying that the dynamically created controls should me initialized in the Page_OnInit . If that's right , give me an example please, if not , just tell me what to do
|
|
|
|
|
TerRO_GirL wrote: i don't find that relevant .
Ok, good luck
led mike
|
|
|
|
|
dude, that was rude .
I took me 10 minutes to read your post and anothet 10 to post this back . I'll give you the links (if you so find them relevant) when i'll get a better connection .
|
|
|
|
|
|
TerRO_GirL wrote: I'll give you the links (if you so find them relevant)
YOU WILL?! That's great because I'm the one that needs the help here. Oh wait.
TerRO_GirL wrote: dude, that was rude .
"Ok, good luck" qualifies as rude? Maybe you should stop smoking crack.
led mike
|
|
|
|
|
Excuse me ?! I asked a totally decent question here and you asked me some stuff that had nothing to do with it ! I am trying to retrive that text , and instead of answering me or shutting up (in case you had no ideea) , you asked me something that had nothing to do with it . And after i've been refreshing and and waiting and losing my nerv trying to refind that link , you're telling me that i'm on crap ?
You know , I ain't gonna argue with some guy who doesn't know how to answer a damn question .
Happy life .
|
|
|
|
|
TerRO_GirL wrote: you asked me something that had nothing to do with it
Here's a tip for using internet programmer forums to ask for help on subjects you don't understand. Since you don't understand the subject, you are not qualified to judge what information is relevant.
TerRO_GirL wrote: you're telling me that i'm on crap ?
No, it was "crack" not "crap".
TerRO_GirL wrote: And after i've been refreshing and and waiting and losing my nerv trying to refind that link
That's not my fault, look in the mirror, there's the person that didn't even save a bookmark to the article they used to develop software from.
TerRO_GirL wrote: I ain't gonna argue with some guy who doesn't know how to answer a damn question .
Ok, you want rude, you got it. f*** off a**hole
led mike
|
|
|
|
|
TerRO_GirL wrote: but i can't retrieve the text from the textboxes
That is a good article you are using (http://aspnet.4guysfromrolla.com/articles/092904-1.aspx). Most likely you troubles are caused by incorrect implementation of ViewState. Did you understand the article and the other articles it linked to about ViewState? It would be critical to using dynamic controls for post-back operations.
led mike
|
|
|
|
|
If you have a limited number of situations and combinations of controls, I'd consider creating them on the server, setting them as hidden using css and then showing them instead of creating them. Or I'd create a hidden field on the server, and put XML or some other string in that to tell you what text had been entered.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thank you , Christian , I've already used the visible thing on some controls, but now i have an unknown number of them , so i really need to do this dynamically ..
If you have some other suggestion , please help me out
Thank you
|
|
|
|
|
Hi,
I am trying to do the below
In Server Side Page_Load (IsPostback) with sever side conditions I am Calling javascript confirm and trying to Return Client Confirm Return value back to the Server on the Runtime. I have pasted the both Server side code and Javascript function below.
ClientSide Javascript:
function UnSavedDataconfirm(Hdn)
{
var hdnfld = document.getElementById(Hdn);
if (confirm("There are some unsaved data. Are sure you want to Change Project Selection?")==true)
{
hdnfld.value = "True"
}
else
{
hdnfld.value = "False"
}
}
ServerSide Page_Load:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = True Then
If IsValidProjectSelection = True Then
Page.ClientScript.RegisterStartupScript(Page.GetType, "UpAlert", "<script>javascript:UnSavedDataconfirm('" & hdn_pschange.ClientID & "');</script>")
If hdn_pschange.Value = "False" Then '(No value Returned from client)
Exit Sub
End If
End If
End If
End Sub
Please let me where I am going wrong or let me know know if there is some other ways to handle this situation.
Thanks in advance.
|
|
|
|
|
what is the issue ? Where do you find it doesn't do what you expect ?
Why do a postback if they don't want to save ? Use OnClientClick to return false if they don't want to save and the OnClick of a button will not be called, no postback will occur.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Where do you find it doesn't do what you expect ?
Isn't he expecting his server variable (hdn_pschange.Value ) to have changed after he adds his javascript to the output stream? Surly that's not going to happen right?
Mohamed Arif wrote: Page.ClientScript.RegisterStartupScript(Page.GetType, "UpAlert", "javascript:UnSavedDataconfirm('" & hdn_pschange.ClientID & "');")
If hdn_pschange.Value = "False" Then '(No value Returned from client)
led mike
|
|
|
|
|
Isn't that what UnSavedDataconfirm does ? Set the text in that hidden control ? Either way, his problem is so urgent that he can't answer us, so....
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Isn't that what UnSavedDataconfirm does ? Set the text in that hidden control ?
Sure but it's not going to effect the current state of your server code at the time you call Page.ClientScript.RegisterStartupScript
Christian Graus wrote: Either way, his problem is so urgent that he can't answer us
After reading his post, I was only interested in having a conversation with you so I could talk to someone that has a clue.
led mike
|
|
|
|
|
Thanks for your help in advance.
Here is my problem. I have an asp page that is a calender.
Once someone picks a Lake and then moves forward 1 month or back one month (using th e < or > images in the calendar on the right side of the screen) they lose the lake and need to repick it. Somehow I need the links associated with the images < and > to dynamically create the URL using the LAKE selected.
I have full source code for anyone who wants to take a look at it.
Here is the page.
http://www.basscalendar.net/
Thanks again and I am even willing to pay someone a few bucks to make it work (paypal) if you think you can do it. It's been giving me fits - but, I am database programmer not a web programmer!
|
|
|
|