In my application, there is a url with a query string at the end. From Maintain.aspx I am redirecting the page to EditIndex.aspx for editing an item. So the EditIndex.aspx contains a query string mentioning which item to be edited. For eg: It is like this:
Don't use query strings for this it is a bad idea. None of the options you have are foolproof. You can encode the part of the query string. You can encrypt and then encode it. The bottom line, if you don't want users being able to change it you need to use something else like session to store and pass that information from page to page.
Url should be "Hackable," allowing the user to navigate through the site by hacking off parts of the URL.Check This[^]. So a user should able to change the 223 to any value. Check whether the user is having permission to view the details of the item. This method will be used in most of the sites. Goto modify message in CP. You can find the message id send through querystring. Try modifying that. CP will show you error message that you are not authenticated to do this. Like this way you can prevent.
In an asp.net1.1 application I have a datagrid which was working but now its Command events (ButtonColumn and EditCommandColumn events )are not handled any more.The only change I made is adding a header and footer usercontrols(The DataGrid itself is in a usercontrol so there is now three user controls on the page).
I would like some pointers on how to connect to a Firebird standalone database with ASP.NET. I know how to get my web application to connect to an Access database using VB.NET, but want to do the same with Firebird. If someone can show me where to get documentation, or code examples, I would really appreciate it.
I am trying to access microsoft project using Microsoft Project Object Modal 11.0 .... I have used this COMponent (MSProject) successfully using desktop application (C#.Net) .Now that i started using this COMponent in ASP.Net application it started behaving very strange ...
1: using add reference ,I added MSProject Component .
2: I Run the application ,tried creating new instance
MSProject msProj = new MSProject.ApplicationClass();
3: The exception is thrown stating ... "Server Execution Failed"
4: I noticed there was no entry for MSProject.dll in the bin folder, so i copied the dll to bin manually and re-add the reference .
5: For the first time the instance was created successfully and no error reported .
6: In my second attempt to create instance , the same exception was thrown .To my surprise , this time the installation was corrupted .I could'nt open the project file now .
7: Event viewer stated : "Server [some GUID] didnt register with DCom within the required timeout"
In masked edit control, if there is an 'A' in the mask, that represents Only a letter or a custom character. but if i have a Mask like "AAABB-*****-##" where AAABB must be in the mask and user is not required to type it, * represents an alphabet and # represents a number . I can use L for *, 9 for #. Now the problem is when there is an A in the mask. how would i get a character A in the mask Instead of having A which represents Only a letter or a custom character.
hope u get my prob n i would be able to get my answer.
thnx in advance.
I am using message queues for connectin a Wcf Service and Wcf Client,i am able to implement simplex communication between the service and the client,i want to implement Full Duplex communication between the service and the client using message Queues,Do any one have any code for that ,if yes send me ,it's urgent
The stuff I have done with MSMQ it seems to make the most sense to use multiple queues for back and forth communcation. So you know which queue is incoming to the service and with queue is incoming to the client. I have some code for that where the service starts up based off an item coming into the queue.
I had a problem with MSMQ. want to take input from the client side and perform operation on the server side and give the result back to the client.(C#)
eg.To add 2 numbers
I a writing a service for this in the server using operationcontract and then the client makes a request for this service if suppose the server is down the client request is stored in a queue when the server is on it then process the message and viceversa.....(both ways)
My use of the MSMQ is for inter- windows service communication and web service to window service communication. Still, the biggest issues will probably have to do with can your client app access your server that the MSMQ exists on. So you need to answer some questions like. Will all the client apps be on your network? If they are then the solution is a lot easier. If they are not, then it is harder.
If you are using a sql server database or any database for that matter, you can do a similar queueing process with some sql tables. I guess you may want to think about how much work you want to do and what the benifit is of using MSMQ. I am pretty sure you are not just trying to add two numbers together.
Yes all my client applications are on the network.
i have to take input from the client process eg enter two numbers a and b and perform the callculation on the serverside and return back the result to the client .
if suppose the server is down then the client stores the message in a queue which is then retrived by the server and vice versa.
Well, first with the MSMQ stuff I have done the MSMQ is on the server, so if the server is down so would the MSMQ. Now if you are taking about a process that is running on the server is down that is different. You don't want to put the MSMQ on the client since you could have different PCs. I believe there is a way to hook up multiple MSMQ together, but I have not done that.
First you need to set up the MSMQ on your server. If MSMQ is not installed you will need to add it. It is not installed by default. If you go into Add/remove programs then click on add/remove windows components
Select Application Server and then click details. Check the MSMQ check box click ok and then next and go through the wizard till it finishs.
Now that MSMQ is installed you need to create your private queue. I suggest using a namespace of the project. Something like companyname.project.module.inbound What ever server process that will be reading this queue, that user that runs that process needs to have full rights to the queue. So if you are writing a windows service, the user in the login for that windows service needs rights. Right click on the private queue and select security. Add the user and give the user full rights.
Now that your MSMQ is set up you just need to access it.
Let me know when you have the queue set up and then I will give you the code to read and write messages to the queue.
Get the items in a datatable. Maintain a counter variable to count the previous and next clicks. According to the counter variable display values from datatable. Keep datatable in one session or cache.
Suppose you have the required records in a datatable dt, you only need to iterate the row index keeping the column index constant.
The rows index value needs to be stored into a hidden field after each iteration. Below is the C# code for the default.aspx for displaying the records.
using System;<br />
using System.Data;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
public partial class _Default : System.Web.UI.Page <br />
Cls_DBtier Cls_DBtierobj = new Cls_DBtier();<br />
int i = 0;<br />
DataTable dt;<br />
protected void Page_Load(object sender, EventArgs e)<br />
Cls_DBtierobj.mvar_DBConnectionstring = Application["Connection_String"].ToString();<br />
dt = Cls_DBtierobj.getNames();<br />
i = dt.Rows.Count;<br />
LblNames.Text = dt.Rows.ToString();<br />
protected void BtnNxt_Click(object sender, EventArgs e)<br />
int index = Convert.ToInt32(HidIndex.Value);<br />
if (index < i-1)<br />
index = index + 1;<br />
HidIndex.Value = index.ToString();<br />
LblNames.Text = dt.Rows[index].ToString();<br />
HidIndex is the hidden field, LblNames is the label for displaying the records. And BtnNxt is the button display the next record.
Cls_DBtier is class file. Below is the code for it.