|
Hi guys Good morning,
If u see some job ports they will give some textbox to enter work experience...,
If u have more than one, then whenever u will click add more link it will create dynamic textbox and there u can add another one,
Like that the option will continue for number of times..,
Finally when we will click the button it have to store in database..,
How they are getting the dynamic controls id and saving it in to datatbase...,
I have searched in google..,
But they are talking about dynamic control creation but i didnt get how to save those datas in to our database...,
Plz give me some ideas or url sites regarding this...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Follow these steps
Step 1 : Create one method to create dynamic TextBoxes controls
public int count = 5;
public void createTextBoxes()
{
if (ViewState["count"] != null)
count = int.Parse(ViewState["count"].ToString());
else
ViewState["count"] = "5";
TextBox myText;
Table tbl = new Table();
TableRow tr;
TableCell tc;
for(int i=1;i<=count;i++)
{
myText = new TextBox();
tr = new TableRow();
tc = new TableCell();
myText.ID = "txt_" + i.ToString();
tc.Controls.Add(myText);
tr.Cells.Add(tc);
tbl.Rows.Add(tr);
}
PH.Controls.Add(tbl);
}
Step 2: Call this method on page load event.Do not call this method on IsPostBack Condition.
Page_Load()
{
createTextBoxes();
}
Step 3: Now On save button click event, Write this code
if (ViewState["count"] != null)
count = int.Parse(ViewState["count"].ToString());
else
ViewState["count"] = "5";
for(int i=1;i<=count;i++)
{
String myText = ((TextBox)this.Page.FindControl("txt_"+ i.ToString())).Text;
}
Step 4: If you want to add more TextBox on Add event,just increament viewState value and call that method
please don't forget to vote on the post that helped you.
|
|
|
|
|
No i didnt ask this one,
I asked actually in one link button click it have to add one textbox in my form...,
After enter that if my enduser need to fill one more if he click that link button it have to add one more textbox like this i need...........,
Finall the datas have to store into my database
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You can create TextBox instance and add it to a placeholder. But you will end up with viewstate issues. So easy method would be adding text boxes to a gridview/datagrid.
Put a gridview with textboxes placed inside template columns. When user clicks the "Add more" button, add a new row to the grid's datasource and rebind grid. Viewstate for the newly created row will be maintained along with it's parent control, hence you don't get weird viewstate problems.
|
|
|
|
|
YA in footer template if i include, my template textboxes its ok,
But in starting time there is no records in my grid...,
So its not at all showing the footer template columns...,
How u will resolve this one?,
Ya if u dont mind give me some articles of thios one,
(URL sites)
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Hi
I want to create menu using CSS.
there are four depth level in my menu.
Main Menu -> Sub Menu -> 2SubMenu -> 3SubMenu.
suppose if there is 10 Items in 2SubMenu then I want to break these into two or three(depends on items count) columns each contains 5 items.
for example i want like this -
Main
SubMenu->AA|DD
BB|EE
CC|FF
HH|JJ
UU|YY
can any body help me .
how to break using CSS. which property in CSS supports such facility.
Thanks & Regards,
Sunil
|
|
|
|
|
$unil Dhiman wrote: can any body help me .
Here is many types of css based menu.
Visit Dynamic Drive
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi, thanks for looking
Im having a little problem with the popupcontrolextender (pce)
I made it work with a gridview inside the pce (it displays data dinamically, sorts, pages... it works fine)
I have the following:
A linkbutton X as the TargetControlID of the pce
A panel as the PopupControlID which has an update panel inside with conditional update to the linkbuton X click event
Inside this panel i have the gridview with its corresponding sqldatasource
What i now need to do is to put a formview inside the pce and whenever the pce shows the formview, i need to be able to view, edit and insert in the formview
It shows the formmview in edit mode, but i cant change it to edit mode
I have the following:
A linkbutton X as the TargetControlID
A panel as the PopupControlID wich has an update panel inside with conditional update to the linkbuton X click event
Inside this panel i have the formview with its corresponding sqldatasource
Since the update panel has conditional update and only fires when the linkbutton X is clicked it doesnt update
This doesnt work if the formview edit, delete and insert options are Buttons
I noticed that it works if the edit, delete and insert options are linkbuttons
Does anyone have a workaround for this??
Any suggestions?
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
HI,
I Have a situation in my project where i have to send mails to registered users automatically ina particular time and particular day (Like 10 am of monday wednesday in a week or 9 pm of every day in a week). The user registered can select his timezone.So i have to send mail to them according to their time zone. . Somebody plz help me out...
Thanx in advance
|
|
|
|
|
What is your application? asp.net? Your requirement does not seem an event driven, thus your best bet is to use back-end processing. You need either a service or scheduled task / job to run at specific day/time. Then based on your rules send out the emails.
Yusuf
|
|
|
|
|
Hi,
Yusuf I am using asp.net with C#.Can u clarify what u mean by Back end processing.If u mean a windows service. I am new to it
and i dont know how to send mails automatically depending on timezone .
|
|
|
|
|
iam using iframe for mail application.when iam entering the text the default format in iframe is paragraph .now how to change to address format for the first time it is loaded.
|
|
|
|
|
hi everybody,
i'm using ajax to perfom a rendering to my controls as the olds methods used in framework 2.0
to render my control i use a function called activaterendering() i want to fix the time out to this function in client side using javacript !!
i mean if server don't answer in four seconds, desactivate this function.
any way to to do such thing with javascript??
thank you for answering!!
|
|
|
|
|
Use the setTimeout() function:
setTimeout(code, milliseconds);
The documentation is here.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
this function wait a delay before excuting my activateRendering method.
My problem is that i want to break the ajax call when in to second for exemple.
wich function in javascript can perform that break ajax call.
|
|
|
|
|
I have an event defined in the AJAX TabContainer's ActiveTabChange ASPX definition. When I switch tabs, I do get a post-back but the event handler I have defined does not handle the event. I put a break point on the event handler and it is never hit. Please assist.
Thanks,
Steve
|
|
|
|
|
Steve Holdorf wrote: AJAX TabContainer's ActiveTabChange ASPX definition
I show sample code for Tab Extender and I notice that ActiveTabChange event is not Aspx definition event, It is javascript function.
Look at here
Javascript
function ActiveTabChanged(sender, e) {
var CurrentTab = $get('<%=CurrentTab.ClientID%>');
CurrentTab.innerHTML = sender.get_activeTab().get_headerText();
Highlight(CurrentTab);
}
This event called from OnClientActiveTabChanged="ActiveTabChanged"
Download sample site for Ajax Control ToolKit.Search in google
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,
This is not exactly an ASP.NET question but I didn't know where else to post it. Since it is somehow ASP.NET-related, I thought this was the best forum for it.
I am wondering if there is a way to configure the way messages are being sent by the local SMTP. I don't want to do so by code, so I would like to know if there is some configuration file with SMTP parameters that I can change.
I found that such a file exists for Biztalk (http://msdn.microsoft.com/en-us/library/aa560648.aspx[^]) but since i'm not familiar with all this stuff, I don't know if it also applies to the local SMTP server (the one that can be configured through IIS console)
Basically what I need to do is to be able to force a certain encoding of the subject of the emails without having to change my code, in other words, I need to find an alternative for mail.SubjectEncoding = System.Text.Encoding.ASCII;
Is there any way to do that?
Thanks,
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Can you tell me which version are you using ?
In .Net1.1 (System.Web.Mail) may need to set this property as you mentioned.
But .Net2.0 (System.Net.Mail) manage all these things by itself.
So can you do some more research on it. Please let me know.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Talal Sultan wrote: without having to change my code
Do you mind changing the web.config ? I believe this can be set in the web.config.
|
|
|
|
|
hi,
no I don't mind changing the web.config. In fact, I was looking for a solution like that. Changing the code means that I would have to go through all the testing documentation and the release of a fix, and I'm trying to avoid that. So changing the web.config would be a great solution.
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Well, scott has a blog here[^]. It's not showing how to set the encoding, but I guess it will give you a kick start.
|
|
|
|
|
Thanks, I have checked it out. Unfortunately it seems that this method is not able to chage the encoding through web.config as specified by this page: http://www.systemnetmail.com/faq/4.1.aspx[^]
It seems I will have to release a fix to the application anyway since another bug has to be fixed as well. but thanks anyway
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
I have the following data in my table
PartId SerialNo Qty
1 r0011 2
2 r0012 3
3 r0013 4
4 r0014 1
5 r0015 2
1 r0016 7
2 r0017 3
3 r0018 5
4 r0019 1
5 r0020 2
1 r0012 7
2 r0014 3
3 r0018 5
4 r0016 1
5 r0020 2
I need the following output
Page: 1
PartId r0011 r0012 r0013 r0014 r0015
1 2 7 0 0 0
2 0 3 0 3 0
3 0 0 4 0 0
4 0 0 0 1 0
5 0 0 0 0 2
PartId r0016 r0017 r0018 r0019 r0020
1 x x x x x
2 x x x x x
3 x x x x x
4 x x x x x
5 x x x x x
|
|
|
Page :2
same as page 1
---------------------
The columns r0016- r0020 has to display below of first results when there is no room to accomodate for columns.
I have used cross tab but partid:r0016 ---- r0020 are displayed in 2 nd page eventhough there is a lot of space to accomodate in page 1.
Please give me a solution for this problem.
|
|
|
|
|
Hey, Im reading from a database and retrieving a whole long list of URL's. Im using a label and just saying(from my code behind): myLabel.Text += theurl + " ";
Now that obviously just makes a whole long list. But is there some way i can use something like a radiobuttonlist to format them? A radiobuttonlist would be perfect(because you can specify number of columns etc etc) except that i want hyperlinks now radiobuttons.
Thanks alot
|
|
|
|