|
No, you have to bind the datagrid in the PageIndexChanged otherwise the paging will not work!!!! any other possibility??
|
|
|
|
|
Hi ,
I want to open the webform page in new window on clicking the imagebutton.I am using the imagebutton in HTML view in asp.net.Please help me
Thanks
|
|
|
|
|
Hi there,
use js window.open(...) to pop-up an window....
<< >>
|
|
|
|
|
can u send me any example please that describes the window.open function and its arguments.
Thanks
|
|
|
|
|
u can make that imagebutton runat="server". then on click event , u can redirect the user to new page or window.
Sandy
|
|
|
|
|
i use datagrid to show my data from the database, i add a EDIT button to allow user to change data, so , when the user click the EDIT button, normally the row of the datagrid will become textbox, how can i do to make the data become a dropdownlist for user chosing , because i dont want the user key in to edit the data, thank you!!
|
|
|
|
|
Hi cheeken,
While designing the datagrid add dropdown list in EditItem
template.So whenever you click the Edit button the row will be filled by dropdown list controls. Now in the ItemDatabound Event of your datagrid you can populate the dropdown lists with database values.You have to check the template column inside the eventhandler like that----
if (e.ItemType==ListItem.EditItem)
{
// Populate the dropdown lists
}
Tirthadip
|
|
|
|
|
hi ,
I have made a small mistake in the code.
It is
if (e.Item.ItemType==ListItemType.EditItem)
{
// Populate dropdownlist
}
Tirthadip
|
|
|
|
|
thank you for your reply, i will try it, later if i still cannot make it nice, i need your help more, so thank you.
|
|
|
|
|
i insert unicode format data from asp.net to mysql 4.1 with utf-8 encoding on the odbc 3.51 & v5 driver
but
it is insert "?????" in entity of table
Mohammad Kazem Sattari
-- modified at 3:39 Monday 8th May, 2006
|
|
|
|
|
how i can cleare the "Powerd By Crystal Report" from my Asp.net Report?
|
|
|
|
|
Hello all,
I can see how easy it is to connect to DetailsViews, FormView, etc. to be able to view+edit data. Unfortunately, I have been having problems getting it to conform to my CSS files. I almost had it working using the detailsView + ASPNETCssFriendlyAdapters, but my div declaration isn't always the same through out the form - and it wasn't placing my edit buttons in the footer.
So I want to get back to the basics. I would like to just insert the label fields, and the text boxes within my divs, and then post it to my connector.
My div code looks like...
<div class="formContent">
<div class="formText">Name:</div>
<div class="formField"><asp:TextBox ID="name" runat="server" Width="130px" tabIndex="1"></asp:TextBox></div>
</div>
<div class="formContent">
<div class="formText">Email:</div>
<div class="formField"><asp:TextBox ID="email" runat="server" Width="130px" tabIndex="2"></asp:TextBox></div>
</div>
<div class="longContent">
<div class="formText">Comments:</div>
<div class="formField"><asp:TextBox ID="comments" runat="server" Width="130px" tabIndex="3"></asp:TextBox></div>
</div>
<div class="submitButtons"><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/submitButton.gif" /></div>
What should I wrap this in to give me a simple post feature, but allow for add+edit+delete later on?
thanks.
|
|
|
|
|
Hi,
I made a Web User Control "QuestionUserControl" that contains a RadioButtonList and a TextBox. On my web form I use that control inside a Repeater.
<br />
<asp:REPEATER id="QuestionRepeater" runat="server"><br />
<ITEMTEMPLATE><br />
<UC1:QUESTIONUSERCONTROL id="quc" runat="server"></UC1:QUESTIONUSERCONTROL><br />
</ITEMTEMPLATE><br />
</asp:REPEATER><br />
The repeater is then bound to a data source that contains records in the following format: QuestionId INT, QuestionType BYTE (1 = choice, 2 = text)
On the Repeater's DataBound event I call a public method of the QuestionUserControl passing the DataRow that contains QuestionId and QuestionType.
<br />
private void QuestionRepeater_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)<br />
{<br />
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)<br />
( (Cuestionario.QuestionUserControl)e.Item.FindControl("quc") ).ContructQuestion((DataRowView)e.Item.DataItem, this.m_Language);<br />
}<br />
The Public Method in the QuestionUserControl then shows or hides the RadioButtonList or the TextBox depending on the QuestionType. If QuestionType was "choices" the QuestionUserControl then uses QuestionId to retreive a list of choices from the database and binds that to the RadioButtonList.
After the user posts back I gather the values from the multiple QuestionUserControls created by the repeater in the QuestionUserControl_UnLoad event.
Now the problem.
I can gather all the values posted except for the very first RadioButtonList that gets created. Example:
Repeater's Datasource:
The repeater creates 5 QuestionUserControls.
QuestionId QuestionType
1 1
2 1
3 2
4 1
5 2
This creates 5 QuestionUserControls.
The QuestionUserControls that receive a QuestionType == 1, retreive a list of choices and binds them to the RadioButtonList and hide the TextBox.
The QuestionUserControls that receive a QuestionType == 2, simply hide the RadioButtonList and shows the TextBox.
When the user submits the form, the QuestionUserControl_UnLoad event gets fired 5 times, one for each QuestionUserControl created by the repeater. Inside each QuestionUserControl_UnLoad event I have access to the RadioButtonList and the TextBox contained on that particular QuestionUserControl created by the repeater, so I can gather the values of each QuestionUserControl separately.
Once again, inside each QuestionUserControl_UnLoad I can get the values w/o a problem except for the very first QuestionUserControl that has a RadioButtonList.
I changed the order of the questions to put a QuestionUserControl that gets QuestionType == 2 (text) at the top and it had no problems. So it really doesn't matter the order of the QuestionUserControls that the Repeater creates.
The very first QuestionUserControl that contains a RadioButtonList acts as if the RadioButtonList has just been initialized with properties like:
<br />
SelectedIndex = -1<br />
SelectedValue = ""<br />
Sorry for such a long post. I just wanted to make sure you have all the info to help me. This is really driving me crazy .
TIA
|
|
|
|
|
Crystal Reports in .NET
How can i create a report with crystal reports in Visual Studio.NET 2003?
i want to retrieve data from my database and show it as a report in my web application.. can anyone help me please?
Regards,
Nina
|
|
|
|
|
Crystal reports allows you to connect to the database directly from crystal reports.
So just create the report. Create the LogonInfo object and run your report.
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
I always get Logon Failed Error.. any idea how to fix it?
|
|
|
|
|
check your password combination
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
How can i open save file dialog for the user to save the report as a pdf file?
|
|
|
|
|
I havent programmed crystal reports in a year or two, but I vaguely remember theres an option in the DOM settings to set it as pdf.
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Im starting learning .net , and try some downloaded examples,
but everytime a try to view a ??.aspx page in IE i get the same error.
"
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'file:///C:/T/asp/SendMail.aspx'. Line 1, Position...
<%@ Import Namespace="System.Web.Mail" %>
-^
"
Windows XP SP2
IIS 5.1
Internet explorer 6.0
Visual studio 2005
I apreciate some help.
|
|
|
|
|
That is beacuse you are trying to view the aspx file as a file, not as a web page.
You have to view the pages using IIS, e.g. using an address like http://localhost/mysite/mypage.aspx.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your reply
but with
"http://localhost/T/SendMail.aspx"
or
"C:\Inetpub\wwwroot\T/SendMail.aspx"
The error message is the same
|
|
|
|
|
You need to set up IIS to serve the pages first...
(After making sure IIS is installed!), Start->Administrative Tools -> IIS. Expand root-> Websites -> Right Click Default Web Site -> New -> Virtual Directory (Phew!)
This will open up a wizard. This allows you to configure a virtual dir for your web app. This is the difference between plain HTML and asp / aspx etc pages. HTML pages are sent to the browser which renders them directly - which is why you can just open em in IE, but an active page uses the services provided by the webserver (in your case the access it provides to .NET services), to generate dynmic HTML which is then sent to the browser to be rendered (which is why you can view the source of an active page, and all you see is html / client scripts, and not the source of the aspx)
In order for the webserver to provide these services, it needs to know that it's supposed to! When you configure a virtual dir, it then handles the processing like it's supposed to.
The first page is the Alias for the site - how you want to refer to it in the URL..give it a name, and click next, then you can give it the actual location of the directory containing te webapp. At the next page, check what you want (default is just fine), et voila...
now point your browser at http://localhost/NameYouChoseForAlias/ and all should be good....
If it doesn't work, some things to make sure that the site is configured as an application in IIS (right click the site, properties, and if name blank, click Create), and that you have an appropriate default page (default.aspx or whatever), and if not that you add your default to the list of defaults - again through site props.
Sorry so long, hope it helps
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I see alot a popup window like in amazon (move mouse over gold box top of the page) how I can do one like that ?
thanks
|
|
|
|
|
Hi there,
IMO, just go to that page and view HTML source code, you can learn from it then...
<< >>
|
|
|
|