473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

dynamicly adding cotrols to a mobile web page

Hello,


I am making a mobile web site, and my question is : I want to somehow be able to dynamically add mobile web controls( by using the code behind somehow) to my mobile web form....I know how to do that in a regular web page, but it's a little bit difficult because i have a mobile web form....Please help me :)

greetings Snezana
Sep 8 '08 #1
7 1181
Frinavale
9,735 Expert Mod 8TB
...but it's a little bit difficult because i have a mobile web form
Could you please provide more details on what difficulties you are facing?

-Frinny
Sep 9 '08 #2
Plater
7,872 Expert 4TB
Well if you are doing it in the "code behind" then there is no difference?
If you wanted to do it client-side, there might be a problem as I don't know how widely supported javascript is in mobile browsers.

But code-behind all happens on the server side, so it doesn't care if its a phone or a computer or whatever else is talking to it.
Sep 9 '08 #3
PRR
750 Expert 512MB
to dynamically add controls to a web form ...

Expand|Select|Wrap|Line Numbers
  1.       TextBox[] tx = new TextBox[2];  
  2.       Literal lt;      
  3.  
  4.               for (int i = 0; i < 2; i++)
  5.               {
  6.  
  7.                   tx[i] = new TextBox(); 
  8.                   tx[i].Height = 50;  
  9.                   tx[i].Width = 50;
  10.  
  11.                   lt = new Literal();
  12.                   lt.Text = "<br/>";       
  13.  
  14.                   Panel1.Controls.Add(tx[i]);                
  15.  
  16.                   Panel1.Controls.Add(lt);
  17.  
  18.                   lt = new Literal();
  19.  
  20.                   lt.Text = "<br/>";
  21.  
  22.                   Panel1.Controls.Add(lt);
  23.  
  24.               }
  25.  
  26.  
As you can see you need a panel... this is example of server side ....
Sep 10 '08 #4
Plater
7,872 Expert 4TB
Are panel's required for mobile webpages? You can add the controls to any legal container, which would include the Page object
Sep 10 '08 #5
PRR
750 Expert 512MB
ya any legal container will do....
Sep 10 '08 #6
Frinavale
9,735 Expert Mod 8TB
I'm still unclear on what difficulties are that this person is facing.
Sep 10 '08 #7
Plater
7,872 Expert 4TB
I'm still unclear on what difficulties are that this person is facing.
I don't think the OP new how to dynamically add controls.
Sep 10 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jose Gonzalez | last post by:
How to apply a numeric format to a textbox using xhtml? I know you have to use the "-wap-input-format" style tag in css. I can get this to work in a regular xhtml page, however, I've been...
1
by: Kristof Pauwels | last post by:
Hellow, I have this peace of code from an ASP.NET page for a Mobile device, but i have a small problem. In this first SUB I dynmamicly create a MobileControls.Command. I add an EventHandler to...
1
by: Henke | last post by:
Hi I have a aspx-page with a panel-control. On this panel control I add user controls dynamicly with LoadControl and panel.Controls.Add(myControl). On some of the dynamicly added user controls I...
7
by: Tim | last post by:
I am trying to load both server and user controls into placeholder controls on a aspx template page at runtime. These values would be strings that are returned from a database query. I know I can...
0
by: Wiktor Zychla | last post by:
Hi there, I've just started to dig into mobile ASP.NET and I'd really wish to clarify few things. I have the experience with ASP.NET. 1) Some tutorials mention something called Microsoft...
4
by: GS | last post by:
Hi, I dynamicly add custom control in SelectedIndexChanged even of GridView which is firing after Page_Load. My control is not being rendered to page becouse of that (I assume). How to avoid this...
3
by: Sleepwalker | last post by:
Hi, I'm currently working on creating a stripped down part of a company web page, that will be accessed from cellphone. The problem I have is that the Windows Forms authentication makes it...
4
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi everybody, I've got an ASP.NET 1.1 application and I need to add to it new Browser Capabilities information for 3 new cellular phones. I used to use...
7
by: cj2 | last post by:
I saw a MS demo a few years back where they developed a web page and the software automatically rendered it for different devices. Is this what I'm looking for? http://www.asp.net/mobile/ ...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.