|
The label doesn't repet many time just in the top of the repeater
"<asp:Repeater ID="myRepeater" runat="server">
<HeaderTemplate>
<table border="2">
<tr>
<td colspan="5" height="30"><asp:Label ID="LblName" runat="server" Text="dddddd"></asp:Label></td>
</tr> "
.....
the error is as it appear in message in catch exception :"Object reference not set to an instance of an object. "
Thanks a lot Christian
Assaf
|
|
|
|
|
See my comments on one of the many other threads you've created on this issue, below.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi there,
You need to view html code generated from browser...to see what is the exact name...
<< >>
|
|
|
|
|
plz all i want your help urgently
i have a form that include combo box which contain all axps pages in my web project
my case is>>>
when i choose each page from the combo box i can call each control in the selected page to load them in the main form
so i have to make a function which take my page.aspx name to return all controls in this page without open this page i mean without open the selected page previously .
really thx for all and special thx for each one can help me
Kareem Elhosseny
Kareem Elhosseny
|
|
|
|
|
Please don't cross post
In addition to the answer I gave in the C# forum, you realise your other pages don't actually exist ? I mean, the page you're viewing is the only one that exists in memory, and that you can interact with. If you want to reproduce control layout, you need to use user controls. If you hope to grab state from those other controls, it doesn't exist, you need to pass it on the URL, or store it in session state, or use cross page postback (yuck), to move state between pages.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How i can refer to the label inside the repeater, from the code behind
to set his Text value
Please clarify me the point because i can't get it i post this message 3 times
Thanks a lot
Assaf
|
|
|
|
|
hi i will try to make it simple
first you have button when i click on it change lable name " mylable"
foreach ( repateritem myitem in myrepater )
{
lable my_lable = (lable) myitem.FindControl("mylable"));
my_lable.text = "I Got it"
}
I hope you Got it
-- modified at 17:04 Sunday 29th July, 2007
|
|
|
|
|
Thanks I got it it work in C#
But how i can make it work in VB.Net
Thanks a lot
Assaf
|
|
|
|
|
I realy dont know VB now Long time dont use it
|
|
|
|
|
If it works in C#, why would it not work in VB.NET ? Looking at the code you posted above, I think it's because you are not stepping through the repeater items, which is where the labels are.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, I've created a login page and I'm done writing code for the comparison of user input with user name and password stored in the database. Suppose I have 4 web pages, Page1, Page2, Page3, and Page4. If I want anonymous users to be able to access Page1, but require users to login to use the other pages, where and how do I set the requirement for each page to have that happen? I am confused by the article on the subject. It says that one can use the "allow" and "deny" tags of the "authorization" in Web.Config to set permission. What I'd like to know is can you specifically use that to set the permission of a particular page or does that apply to all pages. Thank you in advance for your help.
-- modified at 23:11 Sunday 29th July, 2007
|
|
|
|
|
hi
u need to save a flag variable in Session and in each page check if that flag have the right value on page load or and in eatch operation like update insert .
if the user name and password true
Session["flag"] = "true";
else
Session["flag"] = "false";
if ( (Session["flag"] != null) && (Session["flag"].Tostring == "true")
{
then can see the page
}
else
{
Response.Redirect("CantLoignPage.aspx");
}
I hope it help
|
|
|
|
|
Dunno what the other guy was talking about...
I'd create a base page class, which checks if the user is logged in, and, if not, redirects to the login page. You can elect to pass the calling page on the URL, so when they login, they get taken back to where they were, but you don't have to, for it to work.
Now, you have a base page which enforces login. Simply derive only pages that require login from this base page.
I hope you're not pulling any usernames or passwords from the database into your code ? You should check login by passing the username/password to the database and having it tell you true or false.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
u should use Session for the authorization..
1.In Page1 u allow anonymous user to access the pages
2.In the other page(Page2,Page3, and other page that need to login first) u have to insert a session check in code behind (*.aspx.cs) on event load
Example :
<br />
if((Session["username"]==null) && (Session["password"]==null))<br />
{<br />
Response.Redirect ("LoginPage.aspx");
}
note : u must declare Session (Session["username"] and Session["password"]) in u'r login page
Example :
<br />
Session["username"]==UsernameTextBox.Text;<br />
Session["password"]==PasswordTextBox.Text;<br />
Hope it can help
Regards,
Tomi
|
|
|
|
|
I am relatively new to ASP application development. I have created a database application that runs on the Web. I have now finished the application and it is running on my machine using the Localhost connection. Now I want to deploy it to the web and company intranet. How does one go about this? Do I have to compile the application as some pages contain a lot of VB .Net code or they are deployed as they are?
EmbassyPhiri
|
|
|
|
|
EmbassyChikafahPhiri wrote: Do I have to compile the application as some pages contain a lot of VB .Net code or they are deployed as they are?
You shouldn't have to in theory, as long as you don't have database connection strings hardwired into the code or anything like that.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have a FormView that is connected to SQL Server. I want to insert new record to it, OK. When I open the FormView I want one or more of the fileds to be a dropdown list or listbox that make the user choose one of the list that is in that filed. Also, the content of the dropdown list is suppose to be taken from a store data (from a table) in the database.
Thanks a lot for your help and I wish someone to help so that I could solve this problem...
-- modified at 4:00 Monday 30th July, 2007
|
|
|
|
|
|
How we can upgrade/change an Application Pool running process to System user?
I want to use HttpListener but there is no permission.
I can't change this option directly from server because this isn't a standard option.
How can i do this with scripting or etc?
Any suggestion will appreciate.
Thanks.
|
|
|
|
|
In fact my problem is working with HttpListener in server side to listen some ports like 8080.
No one can help me?
|
|
|
|
|
hello yaar,
Write the code in Web.config---->app settings or HTTP Handlers u will get.
ok
Murali
|
|
|
|
|
How can I convert(Parse) String to Time?
e.g. I have this varchar (4:30) in 24 hours style or (4:30 AM) and I want to parse it to Time?
What should I do?
Thank you for your help...
-- modified at 7:11 Sunday 29th July, 2007
|
|
|
|
|
hello
just try this code:
DateTime dt=Convert.ToDateTime([your string]);
msma
|
|
|
|
|
I put three dropdownlists in formview control.Two of them have OnSelectIndexChanged events.The problem is First one firing its own event but second one also firing SelectIndexChanged event of First one only when Item is selected...
TSRK
|
|
|
|
|
hi
i think that you create your first dropdown list and then copy it twice .
so i think you set the event_name for first one and so,second and third one have the event with same name of first one
so you can check the event name of them and set the unique name for every event of them
good luck
msma
|
|
|
|