|
Try
Response.Redirect("Page Name");
I think it should work.
Rock Star
|
|
|
|
|
While Replying, please make sure that you are replying to a correct person. You are replying to me, but you need to reply the person who asked the question. As you are replying to me I am getting an Email notification, which is not usefull to me, but your answer may helpful to the person who asked the question. Hope you got my point.,
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
So i am making a "Delete" button, which is on a gridview. The link calls some javascript, updates the hiddenfield value and then opens a jQuery dialog. In the dialog, there is a "Yes", "No" options.
If the user clicks "Yes", i get the value of the hiddenfield and delete the record.
Button;
<a href="#" onclick='LoadDialog(<%# Eval("AccountId") %>)'>Delete</a>
Javascript;
function LoadDialog(accountId) {
$('#<%= HiddenFieldAccountId.ClientID %>').attr('value', accountId);
$('#dialog').dialog('open');
return false;
}
Dialog;
<div id="dialog" title="Delete Account">
Are you sure you wish to delete this account?<br /><br />
<asp:HiddenField ID="HiddenFieldAccountId" runat="server" />
<asp:LinkButton ID="LinkButtonDelete" runat="server" onclick="LinkButtonDelete_Click">Yes</asp:LinkButton> |
<a href="#" onclick="UnloadDialog()">No</a>
</div>
When the "Yes" (LinkButtonDelete) is clicked, i step into the code and look at the hidden field, and this is where i come to the problem. The hidden field value is empty.
I've added an alert message to the 'LoadDialog' javascript, and i know the account id is set, its just the code behind cant see it is.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
No one got any ideas?, Someone must of had to create a "Confirm" dialog in jQuery and display some data from code behind before...
Regards,
Gareth.
(FKA gareth111)
modified on Tuesday, December 29, 2009 11:06 AM
|
|
|
|
|
Problem solved. The HiddenField was always returning empty, even if i set it in the code behind. It was because it was located in a panel. Weird, not sure why, but once i moved it from one part of the page to the top (outside of the panel), it worked.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hi All ,
I have the requirement that user is logged in from some place.
now if he again login from same id from other place i want to logout.
for this i storing value in data base of session then checking.
now if user login from another place after checking from database another confirmation message box should come user is logged in fom other place do u want to logged out this i want in java script pop up or any popup.
I am unable to display confimation message box from code behind.
Can u guys help me to solve this probs.
Thanks and regards,
Amit Patel
|
|
|
|
|
Check this[^] article. Looks like this is what you need.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hi
Does anyone know free source code of the forum which is done in asp.net ? I've found several examples but they are shareware.
I want to write my own forum and I want to learn how to do it from examples.
|
|
|
|
|
|
|
Hi All,
DateTime.now.tostring("dd-mm-yyyy") it shows correct time format. but it shows server's time.i need it in IST +5:30 time Zone can you help how do display it in correct format.
|
|
|
|
|
Hope this will help you
DateTime.Now.ToUniversalTime().AddMinutes(330)
Life Is Beautiful
|
|
|
|
|
Try Culture Settings (HI-IN)
|
|
|
|
|
hi i am using sitemappath control in my website.i have some pages in common like:
home>>stonecollection>>ProductStone>>Cart>>...
home>>newarrivals>>ProductStone>>Cart>>...
i use the following sitemap file:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default2.aspx" title="Home" description="This is Home Page.">
<siteMapNode url="Stones.aspx" title="stones" description="Refine stones page">
<siteMapNode url="ProductStone.aspx" title="ProductStone" description="Product Stone page">
<siteMapNode url="Cart.aspx" title="Cart" description="Cart page"></siteMapNode>
</siteMapNode>
</siteMapNode>
<siteMapNode url="Newarrivals.aspx" title="stones" description="Refine stones page">
<siteMapNode url="ProductStone.aspx" title="ProductStone" description="Product Stone page">
<siteMapNode url="Cart.aspx" title="Cart" description="Cart page"></siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMap>
but i got error:multiple nodes with same url found.
when i remove the sitemapnode with url productstone.aspx and cart.aspx from one of the parent node
the problem is solved but i want sitemap in above pattern.tell me what to do.....
thank's
|
|
|
|
|
Hi
The problem with this control is that you cannot use same page for multiple nodes.
As in your case are using ProductStone.aspx multiple times
|
|
|
|
|
what shud i do then...is there any other way..
|
|
|
|
|
Yes, You can use dummy query string or # with the url. That will resolve your issue !!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
try like this..!
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default2.aspx" title="Home" description="This is Home Page.">
<siteMapNode url="Stones.aspx" title="stones" description="Refine stones page">
<siteMapNode url="ProductStone.aspx" title="ProductStone" description="Product Stone page">
<siteMapNode url="Cart.aspx" title="Cart" description="Cart page"></siteMapNode>
</siteMapNode>
</siteMapNode>
<siteMapNode url="Newarrivals.aspx" title="stones" description="Refine stones page">
<siteMapNode url="ProductStone.aspx?ssd=asd" title="ProductStone" description="Product Stone page">
<siteMapNode url="Cart.aspx?ssd=asd" title="Cart" description="Cart page"></siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMap>
For More info of Menu Control refer this link..!
Menu Control Selected Item Color Change Depending on Selection [^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Dear All,
I want to use best caching tech for getting,
dynamic data from server
for exmple my server hosting stock values and values will change always
and thier are alot of hits on server with hight traffic ,
i want to use caching to improve the performance,and not get unchanged values??
i will use web service to consume values..
Yes. CreatiVity withOuT limiTs
modified on Friday, December 25, 2009 12:06 PM
|
|
|
|
|
You have a quick read on this article. This may give you a good idea,
Exploring Caching in ASP.NET[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
thanks for link
but i want for updatable data to be cached??
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
Amr M. K. wrote: but i want for updatable data to be cached??
Yes, you can easily do that. You can use CacheDapendency with the data. When ever the source of the cached data will change cache data will update automatically. From where you are reading the data ? If it is sql server you can easily set dependency with the database server or if you are reading data from file then also you can set the dependency with the file.
Let me know if you need any more help.
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
thanks for reply,
I read that you can do it in aspx page
but it will work in web service,,how?
data source from sql server
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
|
Hey guys, I have searched about this on the new and here but I'm still confused, so I'm gonna lay out this and hopefully with your help I can get it over with.
I'm trying to design and implement a 3 layer web application,
I want to fetch the info(fields such as name, email, ... ) for a student from Student table in my database:
(consequently I want to do update, delete and insert as well)
In my DAL class I fetch the record from database and return a dataset:
public DataSetFetchProfile(string UserName)<br />
{ <br />
DataSet ThisDataSet = new DataSet();<br />
ThisAd.SelectCommand = new SqlCommand("Profile_FetchStudentInfo", ThisConnection);<br />
ThisAd.SelectCommand.CommandType = CommandType.StoredProcedure;<br />
ThisAd.SelectCommand.Parameters.Add("@UserName", SqlDbType.NVarChar, 256).Value = UserName;<br />
ThisAd.Fill(ThisDataSet, "StudentT");<br />
return ThisDataSet;<br />
}
and I have this function in my BLL class calling this one:
public DataSet ReturnProfileInfo(string UserName)<br />
{<br />
return ThisStudent.FetchProfile(UserName);<br />
}
There are two things I might do in my presentaion layer (webpage),
1- populate some text boxes (fields of the record which was fetched)
I use the following code:
foreach (DataRow row in ThisDataSet.Tables["StudentT"].Rows)<br />
{<br />
}
2- populate a grid view ( which is easy by assigning its datasourse to the dataset which was returned)
one thing is that the point of having 3 layered is not having any codes related to database, but I have to have a dataset in my page !
I have read a lot that this isn't such a good way of implementing 3 layer architecture, I'm working on my final project and I need something not too much confusing.
I would really appreciate it if you could send me a sample of redirect me to a page ( again as I mentioned before, I 'm looking for something less confusing and easy to implement), so I can finish it and also learn something.
Regards,
K
|
|
|
|