|
Hi,
Please answer my question . i took two dropdownlist ..one is department and one is employee.. in ddldept i m poupating data frm database ..ok . then .if user can select any one in ddldept Name Like HR,PM,payroll so automatically i m populating employee name to ddlemploye according 2 user selcted dept. ok .. if once i selected ddldept any field so data populating and if i selcted again another field then here populating all employee name i.e .. prevoius selected data and current data.. and my prob is now .. s i want only current selected data only .. please can u tell how to solve this prob..
Some Thing need 2 do NEW
|
|
|
|
|
There is a clear method. Call that before you fill the second drop down. Something like
ddlemploye.Items.Clear()
|
|
|
|
|
ok thnx dude..
Some Thing need 2 do NEW
|
|
|
|
|
By using ajax calendar extender how to check the selected date's day is saturday or sunday.
Thanks in advance...
|
|
|
|
|
AJAX calendar extender don't have anything to do here. You can get the day using DateTime.DayOfWeek.ToString() and check it is saturday or sunday
|
|
|
|
|
hi everyone
i got some problems to manipulate a gridview using the AJAxControls toolkits
here is my problem i got a gridview binded with data here is the code ofmy page
]]>
<title>Untitled Page
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
<asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
<contenttemplate>
<asp:gridview id="GridView1" runat="server" allowpaging="True" allowsorting="True" autogeneratecolumns="False" datakeynames="StructId" datasourceid="ObjectDataSource1" onselectedindexchanged="GridView1_SelectedIndexChanged">
<columns> <asp:boundfield datafield="StructId" headertext="StructId" insertvisible="False">
ReadOnly="True" SortExpression="StructId" />
<asp:boundfield datafield="Code" headertext="Code" sortexpression="Code">
<asp:boundfield datafield="Type" headertext="Type" sortexpression="Type">
<asp:boundfield datafield="Nom" headertext="Nom" sortexpression="Nom">
<asp:boundfield datafield="Departement" headertext="Departement" sortexpression="Departement">
<asp:boundfield datafield="Postcode" headertext="Postcode" sortexpression="Postcode">
<asp:boundfield datafield="City" headertext="City" sortexpression="City">
<asp:boundfield datafield="Password" headertext="Password" sortexpression="Password">
<asp:templatefield headertext="Séléction">
<itemtemplate>
<asp:hiddenfield id="hidden" runat="server" value="<%# Bind(" code")="" %>"="">
<asp:checkbox id="chkSelect" runat="server" headertext="Sélection">
<triggers> <asp:asyncpostbacktrigger controlid="GridView1" eventname="SelectedIndexChanged">
<asp:objectdatasource id="ObjectDataSource1" runat="server" deletemethod="Delete" xmlns:asp="#unknown">
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GridViewJSSample.DataSet1TableAdapters.StructureTableAdapter">
<deleteparameters>
<asp:parameter name="Original_StructId" type="Int32">
<asp:gridview id="selectionGridview" runat="server" xmlns:asp="#unknown">
the paging is done in ajax wish is great thing!!
my problem now that i want an event that fires when i'm selecting a checkbox in my gridview, the hole row will change style to turn to selected style and get in the row id(structure code)in sever side to fill the second gridview ans add the selected row in gridview one to selectionGridview.
thanks you for your help
|
|
|
|
|
excuse me, but i need your help... first of all, i don't know your answer jeje but i need to know how did you do to make paging work for you??? ah! is just that i don't find the answer anywhere... thanks
|
|
|
|
|
I have a FormView control on my form connected to an objectdatasource and I can't understand why it is looking for an update query with parameters that are not part of the ObjectdataSource definition.
Here is my ObjectDataSource:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="PriceModuleTableAdapters.TAKUSQuoteHistoryTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="QType" Type="Int32" />
<asp:Parameter Name="Qdate" Type="DateTime" />
<asp:Parameter Name="RequestorID" Type="String" />
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="FORMULA_CODE" Type="String" />
<asp:Parameter Name="Version" Type="String" />
<asp:Parameter Name="RMC1" Type="Decimal" />
<asp:Parameter Name="RMC2" Type="Decimal" />
<asp:Parameter Name="RMC3" Type="Decimal" />
<asp:Parameter Name="Complexity1" Type="Decimal" />
<asp:Parameter Name="Complexity2" Type="Decimal" />
<asp:Parameter Name="Complexity3" Type="Decimal" />
<asp:Parameter Name="FormulaWtPerGallon" Type="Single" />
<asp:Parameter Name="ProdCost1" Type="Decimal" />
<asp:Parameter Name="ProdCost2" Type="Decimal" />
<asp:Parameter Name="ProdCost3" Type="Decimal" />
<asp:Parameter Name="MarginMult1" Type="Single" />
<asp:Parameter Name="MarginMult2" Type="Single" />
<asp:Parameter Name="MarginMult3" Type="Single" />
<asp:Parameter Name="UseLevel1" Type="Single" />
<asp:Parameter Name="UseLevel2" Type="Single" />
<asp:Parameter Name="UseLevel3" Type="Single" />
<asp:Parameter Name="Original_ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="QType" Type="Int32" />
<asp:Parameter Name="Qdate" Type="DateTime" />
<asp:Parameter Name="RequestorID" Type="String" />
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="FORMULA_CODE" Type="String" />
<asp:Parameter Name="Version" Type="String" />
<asp:Parameter Name="RMC1" Type="Decimal" />
<asp:Parameter Name="RMC2" Type="Decimal" />
<asp:Parameter Name="RMC3" Type="Decimal" />
<asp:Parameter Name="Complexity1" Type="Decimal" />
<asp:Parameter Name="Complexity2" Type="Decimal" />
<asp:Parameter Name="Complexity3" Type="Decimal" />
<asp:Parameter Name="FormulaWtPerGallon" Type="Single" />
<asp:Parameter Name="ProdCost1" Type="Decimal" />
<asp:Parameter Name="ProdCost2" Type="Decimal" />
<asp:Parameter Name="ProdCost3" Type="Decimal" />
<asp:Parameter Name="MarginMult1" Type="Single" />
<asp:Parameter Name="MarginMult2" Type="Single" />
<asp:Parameter Name="MarginMult3" Type="Single" />
<asp:Parameter Name="UseLevel1" Type="Single" />
<asp:Parameter Name="UseLevel2" Type="Single" />
<asp:Parameter Name="UseLevel3" Type="Single" />
</InsertParameters>
</asp:ObjectDataSource>
When I try to update a record I get the following error:
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: QType, Qdate, RequestorID, CustomerID, FORMULA_CODE, Version, RMC1, RMC2, RMC3, Complexity1, Complexity2, Complexity3, FormulaWtPerGallon, ProdCost1, ProdCost2, ProdCost3, MarginMult1, MarginMult2, MarginMult3, UseLevel1, UseLevel2, UseLevel3, original_ID, ReqName, CoName, FormulaDesc.
Notice that the fields, ReqName, CoName and FormulaDesc are not even defined in the Objectdatasource UpdateParameters !
What's going on here?
How do I force the FormView control to use the Update method as defined in my ObjectDataSource?
|
|
|
|
|
Pardon me if this is a stupid question: This is the first ASP.NET app. that I have ever worked on.
Is there a way for code in the ASP .NET app. on the server to trigger a page refresh on the client?
I am working on a small web app. that monitors a special-purpose "server" machine (not a web server), and the server is capable of sending out notifications to "subscribed" clients when the state of certain things change on the server. It would be nice if I could set up the web app to receive those notifications (in a worker thread or something), and then cause the client page to refresh when one of the notifications came through. I am not sure this is even possible, or practical, since this seems to me to be bass-ackwards from the way web apps in general work.
Alternatively, I could do the Java script client trick that I saw somewhere that makes the client refresh the screen every N amount of time, but I would rather do the above if possible (because I am difficult, I guess).
Again, please excuse me if this is a stupid question...
|
|
|
|
|
Tom Delany wrote: It would be nice if I could set up the web app to receive those notifications (in a worker thread or something), and then cause the client page to refresh when one of the notifications came through. I am not sure this is even possible, or practical, since this seems to me to be bass-ackwards from the way web apps in general work.
Delany, you idiot, the server can only respond to requests from the client! What the heck do you have in that coffee mug?
In thinking about it further, I realized it was stupid question, and that anything I do to make the page refresh would have to be from the client side.
Unless there is some magical mechanism that I am not aware of...
|
|
|
|
|
You must use javascript to refresh a page. Of course you could check some variable on the server using an ajax call and then refresh the page (or not) based on the result.
I didn't get any requirements for the signature
|
|
|
|
|
Thanks. After I thought about it, I realized that must be true. Good idea about checking the variable. I'm starting to wonder if it is worth all the effort, though. I think maybe just having the client refresh the page "every so often" would be good enough.
|
|
|
|
|
Here is the javascript if you want to go that route.
// CREDITS:
// Automatic Page Refresher by Peter Gehrig and Urs Dudli
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com & http://www.designerwiz.com
// info@24fun.com
// 8/30/2001
// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a link to http://www.24fun.com on the webpage
// where this script will be running.
////////////////////////////////////////////////////////////////////////////
// CONFIGURATION STARTS HERE
// Configure refresh interval (in seconds)
var refreshinterval=60
// Shall the coundown be displayed inside your status bar? Say "yes" or "no" below:
var displaycountdown="yes"
// CONFIGURATION ENDS HERE
////////////////////////////////////////////////////////////////////////////
// Do not edit the code below
var starttime
var nowtime
var reloadseconds=0
var secondssinceloaded=0
function starttime() {
starttime=new Date()
starttime=starttime.getTime()
countdown()
}
function countdown() {
nowtime= new Date()
nowtime=nowtime.getTime()
secondssinceloaded=(nowtime-starttime)/1000
reloadseconds=Math.round(refreshinterval-secondssinceloaded)
if (refreshinterval>=secondssinceloaded) {
var timer=setTimeout("countdown()",1000)
if (displaycountdown=="yes") {
window.status="Page refreshing in "+reloadseconds+ " seconds"
}
}
else {
clearTimeout(timer)
window.location.reload(true)
}
}
body onload="starttime(); "
I didn't get any requirements for the signature
|
|
|
|
|
Wow! Thanks man! That was over and above my expectations. I was planning to go Google for it again (I found something similar once before).
Again, thanks!
WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.
There are 10 kinds of people in the world: People who know binary and people who don't.
|
|
|
|
|
You're welcome.
I didn't get any requirements for the signature
|
|
|
|
|
The refresh JavaScript code worked a treat. Thanks.
Now, however, I have a different issue to figure out:
My Web form has several controls on it (mostly buttons and a couple of text boxes). If I just bring the page up and don't touch it, it refreshes fine. If I click on one of the buttons (which incidentally causes some of the text in the text boxes to change due to the code-behind logic), when the refresh times out, I get the "To display the webpage again, Internet Explorer needs to resend the information you've previously submitted." message with the "Retry" and "Cancel" buttons. I get a similar message with Firefox.
I read somewhere that if I added, method="get" to the Form section of the web page, it would cure this problem, but (of course?) when I add that, none of the controls on the page work right when you click on them.
Can you (or anyone) steer me in the right direction?
WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.
There are 10 kinds of people in the world: People who know binary and people who don't.
|
|
|
|
|
As a postback is just that, the request contains post data. The browser will not reload a request with post data without consulting the user, so you can't use a simple reload after a postback. You can use a Javascript timeout that does another postback.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
i m using detailsview for insert update delete but having problem i have to insert from different controls/session/querystring not just from textbox. Any idea when i hit commandbutton it start working or i have to do it manually.
Thanks in advance.
|
|
|
|
|
I'm trying to perform an upload to an ASP.NET webpage from a handheld device. I'm building a request and posting it and the file is getting up to the server, and it's the correct length. However, it can't be opened. I'm encoding using ASCII as when I do using UTF8, the file is not the correct size. If I run the form from the page, the file uploads perfectly. My request looks like;
--8cb3310dd4ceed9
Content-Disposition: form-data; name="__VIEWSTATE"
/wEPDwULLTE2OTYyNjE1OTVkZMfpfFSzt/YF7vZvjpHY4Ap3YSYj
--8cb3310dd4ceed9
Content-Disposition: form-data; name="__EVENTVALIDATION"
/wEWAwL++b/LAQKpya/eBQLc7/3IC+cHmY1+N1ZM0CEeEny3NKie7uiu
--8cb3310dd4ceed9
Content-Disposition: form-data; name="upload_id"
2321
--8cb3310dd4ceed9
Content-Disposition: form-data; name="databaseFile"; filename="database.sdf"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Length: 3395584
? ?
If I don't put the file in, I can see the rest of my request, and it ends with;
--8cb3310dd4ceed9--
What encoding should I be using, and how should I be including the file. I've been searching for about 6 hours, looking at examples and can't see what I'm doing wrong. I'm posting this in ASP.NET rather than C# on the assumption that it's more web-based. I don't want to double post, so here's hoping this is the right area.
|
|
|
|
|
i have a NETCOBOL Dll which i am using in web application. when i am running this application in windows xp or other except windows server 2003 is running but when i am running the web application in windows server 2003 it hangs on the calling line of dll. is this security issue or some thing else. how to solve this problem?
|
|
|
|
|
did you write the dll ? Apparently it doesn't work in Server 2003.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
no it is a third party dll (Fujitsu NetCobol for .NET)
|
|
|
|
|
Hi,
I've a DataGrid and its bound to a SqlDataSource with a SelectCommand. Now I have to populate this grid with data based on search criteria specified by user.
By default it loads all records because that is what the SelectCommand in the SqlDatasource does. But when the user makes a search criteria and cicks on Search, I change the SelectCommand and call DataBind on the Grid. But once I click on Page 2, it takes the default SelectCommand of the SqlDataSource and shows all records, which is default state.
Is there a work around, or am I doing something wrong with these controls?
Regards,
Blumen
“The thing for you is a burial permit. You have only to speak and I will see that you get it.”
|
|
|
|
|
I wouldn't change select command via code. On every postback the select command is going to back to the select command that you set in the markup.
How you should do this is write one stored proc for example...
create proc dbo.search (@nameValue varchar(10) = null)
select * from yourTable where nameField = isnull(@nameValue, nameFeild)
Something like the above will return all records if the parameter is null. You should not have to change the select command.
Actually, though if your original query pulls back all the records then you could save all the data in a databale and store it in session, viewstate or cache depending on the size and use a dataview to filter.
I didn't get any requirements for the signature
|
|
|
|
|