|
Hi Everyone,
I wanted to open a new page with data for(Crystal report purpose), so i set PostBackUrl as my Target page in my Button, and in my Form tag i set as a Target as "_blank",and also i have 2 DropDown for data loading first dropdown i set AutoPostBack as "True", first time its working fine new page open with data, but if i want to view again with diffent selectedIndex in dropdown without button click its open a Blank page, so i can i solve this problem and is there any different machanism to do this pls help me to do that.
Thanks.
|
|
|
|
|
Can you post some of your code so we can see what is happening?
It sounds like its not using your most updated value because of the postback
|
|
|
|
|
This is my Form Tag
and this is Button Event,
<asp:button id="Button1" runat="server" text="Generate Report" validationgroup="AllSubmit" width="133px" onclick="Button1_Click" postbackurl="~/i/repo_view/tran_view/fpage.aspx">
|
|
|
|
|
Why dont you put the url in the onclick instead
|
|
|
|
|
I have given some code behind coding in onClick event, so i can't use that.
|
|
|
|
|
But you could use an if statement and then put the url in that
Can you psot your code behind so I can try and suggest another solution
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
private void BindData()
{
ArrayList courseList = new Biz.CourseBO().GetAllCourses();
DropDownListCourse.DataSource = courseList;
DropDownListCourse.DataValueField = "ID";
DropDownListCourse.DataTextField = "AsString";
DropDownListCourse.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
if (DropDownListCourse.SelectedIndex != 0 && DropDownListBatch.SelectedIndex != 0)
{
CrBiz.DataTransferComponent co = new CrBiz.BatchFileBO().GetBatchFile(int.Parse(DropDownListBatch.SelectedValue));
this.ReportDoc = co.Document;
this.ReportData = co.DataSet;
}
}
protected void DropDownListCourse_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownListBatch.Items.Clear();
DropDownListBatch.Items.Add(new ListItem("-Select-", " "));
if (DropDownListCourse.SelectedIndex != 0)
{
Ins.ICourse _course = new Biz.CourseBO().CreateCourse(int.Parse(DropDownListCourse.SelectedValue));
ArrayList batchList = new Biz.BatchBO().GetBatch(_course);
DropDownListBatch.DataSource = batchList;
DropDownListBatch.DataValueField = "ID";
DropDownListBatch.DataTextField = "DisplayNumber";
DropDownListBatch.DataBind();
}
}
|
|
|
|
|
I want to delete 14 days old records from table automatic not manually.
how can I run automatic AutoDelete.aspx page at every 14 days interval so I can delete. at the same time I want to pass 14 days(No of days) to AutoDelete.aspx.cs page and I will use this value for procedure parameter.
so please tell me how can I cofigure web.config file.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
trilokharry wrote: how can I run automatic AutoDelete.aspx page at every 14 days interval s
This is not a good idea. Consider using jobs on the database server. Write a job and schedule it to run in the required interval.
|
|
|
|
|
ok fine
then how to handle this situation with database only.
at the same time I have to delete some specific date from table2 also.
thanks for your response
You get the best out of others when you give the best of yourself.
|
|
|
|
|
You can write any query in the job. It will be executed. So form your query, test it and put it in the job.
|
|
|
|
|
job means what
I dont know about this actually.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Here is an example of using a job:
http://technet.microsoft.com/en-us/library/ms189258.aspx
|
|
|
|
|
It can easily be done thru Webscheduler, if you have purchased any domain from godaddy there u can c the feature of webscheduler where u specify a page whose purpose is to delete records and schdule it in webcheduler , which automatically hits the page after every 14 days.
|
|
|
|
|
why doesn't the ASP Data Grid doesn't deletes a row when the delete button is clicked in asp.net 2003
Any advice will greatly help.
Thanks in Advance.
Sekhar
|
|
|
|
|
What does it do then for you? Does it spell out any errors?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
You need to handle the event and do deletion from DB, rebind datagrid again.
|
|
|
|
|
If you had coded correct then there may be missing the handle on that event.
|
|
|
|
|
if in datagrid button id="btndel" and commandname="btndelete"
then
on datagrid's itemcommand write this code.
// code.
if e.commandname="btndelete"
dim btn as button
btn=e.item.findcontrol("btndel")
if not btn is nothing then
''write delete query here.
end if
''refresh datagrid.
end if
Vivek Kushwaha
|
|
|
|
|
Hi,
I am using datalist. In that I am displaying category name. linkbutton is used.
When I click on that LinkButton I want to pass id of that category.
How can I bind the id and name to same linkbutton.
or is there any other solution?
Thanks
|
|
|
|
|
Can you make use of CommandArgument ?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Two ways,
1 - Handle the databound event, find link button control and assign the URL from there.
2 - link button will have a FormatURL property, use that and format your url. Supply data using DataBinder.Eval(Container,"DataItem.Column")
|
|
|
|
|
Dear All
i developed a website asp.net 2.0 with localization.
localization functionality is working fine with IE and Opera but it is not working with browsers like mozilla and netscape
what may be the reason ???
waiting for your reply
Rgds
anee
|
|
|
|
|
Any specific observations?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Thanks for your reply
No Specific observations
when we click the language buttons after a postback language is changing (in IE and Opera) but in mozilla and netscape (after postback) nothing is happening
rgds
anee
|
|
|
|