|
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...
<< >>
|
|
|
|
|
it is a java script how I can see it
|
|
|
|
|
when having HTML code, you can know which js file included. So just download them and check them out ...
<< >>
|
|
|
|
|
the javascript has method :
window.Createpopup();
|
|
|
|
|
this is not what I ment but I try to use popup like a hint but with links and images inside
|
|
|
|
|
please help me how we can use css files in asp.net datagrid
-- modified at 15:34 Saturday 6th May, 2006
|
|
|
|
|
I think just use it as normal....What the issue you got???
<< >>
|
|
|
|
|
I want automated conversation in one of my one page. I want to answer the FAQ in an interactive manner i.e. through conversation. How can I achieve that????
Is there any simple way for this......????????
Azeem Sarwar
|
|
|
|
|
Hi there,
Do u mean that your system auto answer FAQ question? if so, it's not easy...Let's say you have a question, how can the system understand automatically???
<< >>
|
|
|
|
|
Bots are available for this purpose. you can search for bots. You may also use bot suite for this purpose.
http://www.codeproject.com/useritems/botsuite
Mansoor Sarfraz
|
|
|
|
|
Hello all,
I want to setup Web Applicaiton, Web Service and Windows Service within single Setup. For this I have Windows Service Setup file.
I want a Setup application which will configure Virtual directories, installs another EXE.
For this is there any available 3rd party Installation shields or any other is avalilable for .NET 2.0 Applicatons.
any sounds, any suggetions plz tell me
regards
GV Ramana
|
|
|
|
|
hai
may i know .net have any scope or chance at singapore????
i 've 6 months experience in asp.net and MCSD certifier.
All I ever wanted is what others have....
CrazySanker
|
|
|
|