|
Seriously your code is not readable. Please post it in proper Format
As For Example :
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
SqlDataAdapter adapPaging = new SqlDataAdapter("select * from customer", "Data Source=OPWFMS-7KYGZ7SB;Initial Catalog=Mayank;User ID=sa;Password=sa");
adapPaging.Fill(ds);
gridView.DataSource = ds;
gridView.DataBind();
}
so that every body can easily understand the code and give you a quick solution.
pupilstuff wrote: Subject: error : panel1 does not exits in correct context
It clearly saying that Panel1 does not exist
|
|
|
|
|
I am not able to see the panel on the page.where is it?
Cheers!!
Brij
|
|
|
|
|
It is very hard to understand code blocks when there are lots of Server Tags and even most of them are Commented out.
I can see in designer of your html most of the codes are commented out using
<%-- --%>
and also if you have placed a Panel1 in html, please let us see the control in designer.
If you need to use a control Panel1 you need to add
<asp:panel id="Panel1" runat="server">
in your designer, also this shouldnt be within <%-- --%> tag
|
|
|
|
|
hiii
i have created a menu dynamically.i have populated the menuitems from data base.
Now i want that whenever user clicks particular menu item it gets redirect to particular page.
can any body guide me regarding this matter.........
thanks....
|
|
|
|
|
Are you using Asp:Menu, if so use
MenuItem item = new MenuItem("MyItem");
item.NavigateUrl = "yoururl.aspx";
If you are generating the HTML dynamically for menu, just place OnClick attribute for the LI/div item
|
|
|
|
|
pariofshona wrote: Now i want that whenever user clicks particular menu item it gets redirect to particular page.
User MenuItem.NavigateURL
|
|
|
|
|
|
Hi all ,
I'm using asp.net and crystal report
I'd like to view all pages of the crystal report in the web page without using crystal toolbar to navigate the pages ..
can I do that ?
jooooo
|
|
|
|
|
Any type of reporting engine I think renders an HTML, to place it inside a browser.
So If you somehow know the request path for the handler that creates the HTML for you, you can place it in any html container you want.
Check out which request it generates for your report.
|
|
|
|
|
Thanks for reply,
I'm designing a report which contain alot of component in addition to CrystalReportViewer1 ,,
then i'd like to view all pages of the report as html ,
I hope I can do it
jooooo
|
|
|
|
|
so thanks i found it
CrystalReportViewer1.SeparatePages = false;
jooooo
|
|
|
|
|
|
tell me what is assigned to
regSerNo.ControlToValidate
??
|
|
|
|
|
hi,
any one help me,
How to pass values from textboxes on one page to a "another page" using session.
I have the follwing code but it shows an error msg.
public string PassingSession ;
Session["strPharmacyId"] = txtPharmacyId.Text.Trim();
Session["strStoreName"] = txtStoreName.Text.Trim();
Session["strAddress1"] = txtAddress.Text.Trim();
Session["strCity"] = txtCity.Text.Trim();
Session["strState"] = txtState.Text.Trim();
PassingSession = PassingSession + Session["strPharmacyId"];
PassingSession = PassingSession + Session["strStoreName"];
PassingSession = PassingSession + Session["strAddress1"];
PassingSession = PassingSession + Session["strCity"];
PassingSession = PassingSession + Session["strState"];
Session["Pharmacy"] = PassingSession;
dtSession = (DataTable)Session["Pharmacy"];
msg: "can't convert string to datatable";
|
|
|
|
|
Vijay.RG wrote: dtSession = (DataTable)Session["Pharmacy"];
What you are doing over here?
|
|
|
|
|
Passing the session value to datatable object.
DataTable dtSession=new DataTable();
dtSession ==> Datatable object.
|
|
|
|
|
I think you have already got the answer from Manas Post.
Vijay.RG wrote: Passing the session value to datatable object.
Never do like that. It will cause very performance issue.
|
|
|
|
|
Vijay.RG wrote: PassingSession = PassingSession + Session["strPharmacyId"];
PassingSession = PassingSession + Session["strStoreName"];
PassingSession = PassingSession + Session["strAddress1"];
PassingSession = PassingSession + Session["strCity"];
PassingSession = PassingSession + Session["strState"];
Session["Pharmacy"] = PassingSession;
dtSession = (DataTable)Session["Pharmacy"];
You do not this piece of code at all.
You already have assigned the textbox values to the Session Objects, the only thing you need to do is to read it back in the next page.
In between, your design looks screwed and you should rather reconsider thinking of design before starting coding.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I got the code Mr.Manas Bhardwaj ...
Thanks.
|
|
|
|
|
Dont ever store Datatable in Session. It means a huge amount of data will be stored in Session, and for each user who browses the site.
So it will eat up all the app pool memory.
|
|
|
|
|
How can you convert a string to datatable because PassingSession is a string as you declared?
Here you are assigning values to session
Vijay.RG wrote: Session["strPharmacyId"] = txtPharmacyId.Text.Trim();
Session["strStoreName"] = txtStoreName.Text.Trim();
Session["strAddress1"] = txtAddress.Text.Trim();
Session["strCity"] = txtCity.Text.Trim();
Session["strState"] = txtState.Text.Trim();
No need of below code
Vijay.RG wrote: Session["strState"] = txtState.Text.Trim();
PassingSession = PassingSession + Session["strPharmacyId"];
PassingSession = PassingSession + Session["strStoreName"];
PassingSession = PassingSession + Session["strAddress1"];
PassingSession = PassingSession + Session["strCity"];
PassingSession = PassingSession + Session["strState"];
Session["Pharmacy"] = PassingSession;
dtSession = (DataTable)Session["Pharmacy"];
You have already filled the textbox value in session.Now it will be accessible throughout ther application.
Cheers!!
Brij
|
|
|
|
|
Hello,
I am doing my thesis on Windows Azure and I d like someone to show me how to store data in Windows Azure Tables and then how to publish on Azure Services Development Portal.
I would be glad if someone could send me a working example to take some ideas.
Some examples from msdn that I 've downloaded don't run on my computer and I don't know what is wrong.
Any help would be appreciated... 
|
|
|
|
|
hi,
in my project we are using asp.net 2.0 GridView in so many places. Through out the project we are using GridView derived control.
public class GridView : System.Web.UI.WebControls.GridView
{
}
i have added code to maintain seleced checkboxes state, DataKey value ID of selected rows if user selects multiple rows from multiple pages navigation. i am storing the 1) ID, 2) Selected in the ViewState in the form of List.
For this i have 2 methods
StoreCurrentViewState()
RestorePastViewState
this code i have used at...
protected override void OnPageIndexChanging(GridViewPageEventArgs e)
{
StoreCurrentViewState();
base.OnPageIndexChanging(e);
RestorePastViewState();
}
also added at
protected override void OnDataBinding(EventArgs e)
{
StoreCurrentViewState();
base.OnDataBinding(e);
}
protected override void OnDataBound(EventArgs e)
{
base.OnDataBound(e);
RestorePastViewState();
}
it is maintaining selected checkboxes states during the gridview page naigation.
my query is ...
in one aspx page i have 4 grids and for all page it is storing in single ViewState object. i wanted to store these values in sepearate viewstate for each gridview && i need to reset the ViewState object if gridview loads first time. How can i do?
please provide ur inputs...
Ramana
|
|
|
|
|
Use ID or UniqueID of GridViews as the key when storing to ViewState. As each ID is going to be unique in a page, they will be maintained separately for each GriView in ViewState object.
|
|
|
|
|
store the viewstate as GridviewID$ID
and then split it on restoring.
|
|
|
|