|
Hi,
I know I am not the only one struggling with the following, but so far
I have not seen a solution.
Problem:
I have an asp.net 2.0 web page with a gridview which is bound to an
accessdatasource. In my code-behind I want to be able to set the
selectcommand of the datasource to a specific SQL string based on a
user's input to retrieve only certain records.
This works fine when I hit the search button. BUT, as soon as I start
paging or sorting (gridview's default), the accessdatasource seems to
revert back to the initial select command "SELECT * FROM tblProduct"
and all records are shown again.
I know that I could maintain state for the selectcommand using session
variables, but I would like to see a cleaner solution.
My code in aspx:
<asp:accessdatasource id="AccessDataSource1"
datafile="~/App_Data/product.mdb" selectcommand="SELECT * FROM
tblProduct" runat="server" datasourcemode="DataSet">
My code in code-behind:
AccessDataSource1.SelectCommand = "SELECT * FROM tblProduct WHERE
[brand]='" & txtBrandCustom.Text & "'"
Hopefully, anyone out there will have a solution for me!
Regards,
Mark
|
|
|
|
|
hi,
i have used asp+c# n am unable to access the data through wizard..
It is very much possible in c#..
could u plzz help me to solv the problemm..
i just need the instructions
Sincerly,
Shriya
|
|
|
|
|
|
Dear all
I am able to open a window using buttin click and few lines of java script code. But I am unable to pass the values of this second or child window browser to the first browser or the parent browser. Can any one of u advice me or give me little much of code to achieve this task.
U can mail me to : aleem076@gmail.com
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Stop spamming the forum.
You have asked this question several times before, and got several replies to them. Why not follow up on the replies that you got? If you just ignore the people who try to help you, who do you think would want to help you in the future?
As I already explained before, replies goes in the forum, not in your mailbox.
---
b { font-weight: normal; }
|
|
|
|
|
Ok. I am sorry. But they dont wotk in perfect way. And instead of waiting for the same thing I went with another thing. Thats what happened. Please help me int this matter. I would be thank ful.
And remember I want to access not only the html controls, mainly I want to access server side controls from the child Window. So I need to write server side scritping. Please help me in this regard. I would be thank full to them and the forum too.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
aleem076 wrote: Ok. I am sorry. But they dont wotk in perfect way. And instead of waiting for the same thing I went with another thing.
And that other thing is to start three new threads still about the same thing within an hour?
aleem076 wrote: And remember I want to access not only the html controls, mainly I want to access server side controls from the child Window.
That is not even possible.
---
b { font-weight: normal; }
|
|
|
|
|
Dear all
I am able to open a window using buttin click and few lines of java script code. But I am unable to pass the values of this second or child window browser to the first browser or the parent browser. Can any one of u advice me or give me little much of code to achieve this task.
U can mail me to : aleem076 know how to do it.
-- modified at 5:07 Saturday 2nd December, 2006
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi,
i have a problem ,i have a data grid and in this datagrid footer i add the WebUsercontrol this control can contain one textbox and one imgaebutton ,the textbox value is coming from javascritp Window.opener method.now tell me how can i read the value from this webusercontrol .tell me the way or send me some codesnippet that is helpfull form me.
best regards
|
|
|
|
|
Hey guys
I am opening a web form (form2) and when a button is clicked in form1. Both are in two sepatrate browsers. Now I would like have communication from form2 to form1. Means from child borwser to parent browser. And I want to acces the parent forms controls and update them from the child form.
Could any one help me please. I would be thankful to them.
Aleem
VB.Net,ASP.Net, VB, ASP, Database
|
|
|
|
|
Can any one help me out to read the emails from PST file of Outlook into asp.net and i have to fetch all the from address in the PST File. Please Help.
Thanks in Advance,
Regards,
Prya
|
|
|
|
|
|
Hello,
I have used the datalist in Usercontrol which is loaded dynamically in placeholder in aspx page.
There is another usercontrol having dropdownlist on the same aspx page. When call this page for the first time. It works fine. But if I change item in dropdownlist, the post back is done and The datalist's OnItemCreated event is fired directly before calling any other events as in asp.net page life cyle.
So it's creating problem since it uses the dataset which is set to reference in page load of usercontrol where datalist is placed.
I need help since I am at the door of project delivary.
Thanks
Sachin A. Pawar
|
|
|
|
|
in my code user have to fill few forms. i want to show a progress bar (on users main page)indicateing how many (in percent) forms has been filled.
Neha Mishra
|
|
|
|
|
Easiest way is to have a div element on the page somewhere, color it in and set it's width. Keep increasing it's width as the user moves through the form. So if the user is 40% way through the forms set the width to 40pixels, when they're finished set to 100 pixels and so on.
|
|
|
|
|
Hi
I have runtime checkbox in datagrid.When i click on checkbox,how to get coresponding value of checked checkbox?
I write a javascript function on checkbox.
Thanks
monika
|
|
|
|
|
|
i have a javascript menu, when the menu items listed it shows below the dropdown box in the aspx page.
how can i show the menu list over the dropdown control.
thank you
|
|
|
|
|
Can someone please explain to me how does asp.net controls render Html. I'm actually a little confused about the meaning of rendering in this context because when I first drag a control to asp.net designer, it actually generate html...is that what rendering of html is. Please explain I'm just starting out with it. Thank You
TINA
|
|
|
|
|
Tina P wrote: when I first drag a control to asp.net designer, it actually generate html
Not really. It generates markup code, but that is not the final html code.
Tina P wrote: Can someone please explain to me how does asp.net controls render Html.
When the page is created, everything in the markup code is created as objects.
For example, this part of the markup:
<div><asp:Label id="myLabel" runat="server"></div>
will be created as these three objects:
LiteralControl("<div>")
Label id="myLabel"
LiteralControl("</div>")
As you see, everything that is not server controls are treated as literal text.
The last part of creating the page is the rendering, where the objects in the page will each create a bit of the html code. Let's say that you have set the Text property of the label to "Hello world.". Then the three objects will create these three strings:
"<div>"
"<span id="myLabel">Hello world.</span>"
"</div>"
Those strings will be written to the response stream among with the strings from all the other objects in the page to form the complete html document.
---
b { font-weight: normal; }
|
|
|
|
|
Hello Guffa and thanks for your response. First of all, a quick question...I have not heard of markup code as you mentioned above that gets generated when a control is dropped to the surface...is it the same markup as in HTML (hyper text markup language). If so could you please explain what exactly is the difference between just the markup that gets created and HTML.
Also if I have to modify that markup that is generated by a control, can I simply go to the aspx page (html) view and modify it there, or does it have anything to do with the .cs pages also??
Thank you once again.
TINA
|
|
|
|
|
Tina P wrote: I have not heard of markup code as you mentioned above that gets generated when a control is dropped to the surface...is it the same markup as in HTML (hyper text markup language). If so could you please explain what exactly is the difference between just the markup that gets created and HTML.
It's the same kind of markup. It's HTML code mixed with HTML-like tags for the server controls.
Tina P wrote: Also if I have to modify that markup that is generated by a control, can I simply go to the aspx page (html) view and modify it there, or does it have anything to do with the .cs pages also?
You can do it either way.
You can set properties in the markup:
<asp:Label id="LabelOfMine" style="color:#f00;" />
Or you can set properties in the code:
LabelOfMine.Style["color"] = "#f00";
---
b { font-weight: normal; }
|
|
|
|
|
Thanks a lot Guffa for your answers. Now if I want to add some functionality (such as ability to go to a control by clicking a button on the keyboard) which my understanding is doesn't come right out of the box in ASP.Net. Whats the best approach to do that. Like for example if I want the tab order to be set I believe there is a property for that in ASP.NET, but if I have a menu control on top of my page and I'd like to go to the control by hitting a button on the keyboard (such as a hot key combination ALT + 5). So how do I accomplish that in html???
Thanks a lot for your help
|
|
|
|
|
That is not possible using only HTML, you have to use client scripting, i.e. Javascript, to do that.
---
b { font-weight: normal; }
|
|
|
|
|
Hey guys, I was wondering if anyone knows how to navigate using differnt hot key combinations in ASP.Net.
For instance if you do...alt + 1, and then release the buttons and press enter, it will do something (perhaps take you to contact us or homepage) depending on how you program it.
Please let me know if ASP.Net has these capabilities?
Thanks
sam
-----------------------------
If you don't go after what you want, you'll never have it.
If you don't ask, the answer is always no. If you don't step
forward, you're always in the same place. -Nora Roberts
|
|
|
|