|
I would write a base class for all pages, and have a property specifying what group the page belongs to. Then I'd set the code in each page and check the user in the base class.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
need a prog to send messages to administrator or account holder's mobile through bluetooth or any other means when an unauthorised person tries to access any system login or user account or any sort of login form.
|
|
|
|
|
Are you gonna pay??
Alexei Rodriguez
|
|
|
|
|
this is part of my class work, and if necessary i vl pay for it and if it executes completly
|
|
|
|
|
So once you've payed your way through University to avoid doing coursework, you'll pay most of your salary to other people to do your work as well?
After all, since you won't have learnt anything nor seem inclined to work, you'll have a hard time performing in the real world.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
its quite true with the people who depends on computers background but basically i am from mechanical background it wont effect me anyways...... so please try to give me a sol for my prob ....
|
|
|
|
|
Signs that you're an idiot:
1 - you use 'urgent' for a subject when this both is a lie ( your problems are not urgent to us ), and this will do nothing to attract people who can help with your specific question
2 - This question has NOTHING to do with ASP.NET.
3 - You openly ask us to do your homework for you, and then claim that even though it's part of your course, it 'doesn't matter' if you cheat.
I suggest you just apply at McDonalds now.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
You came into a wrong place dear. People come here and share their years of hard word and devotions for technology to help others to grow. This is not a place for people like you who are less interested in learning.
Either you love IT or leave IT...
|
|
|
|
|
Hi,
I used Ajax AutocompleteExtender in 3 Places. But this Worked well in 2 Places and does not worked in One Place. Coding for that is as follows
<ATK:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" TargetControlID="TxtLREmployeeIC_NO" MinimumPrefixLength="1" ServiceMethod="GetEmpICNO" ServicePath="permissionwebservice.asmx">
</ATK:AutoCompleteExtender>
Any one know the Reason please immediately Help Me. Thanks in Advance
Bye.
|
|
|
|
|
Is the ServicePath allright?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I found a simple example that allows the user to hightlight a row in a gridview.
The problem is how do I know which row is hightlighted. For example, how can I get the rowindex of the hightlighted row?
Below is the example code I am using from this url.
http://www.netomatix.com/development/gridviewrowselectedstyle.aspx
protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "onGridViewRowSelected('" + m_iRowIdx.ToString() + "')");
}
m_iRowIdx++;
}
var gridViewCtlId = '<%=ctlGridView.ClientID%>';
var gridViewCtl = null;
var curSelRow = null;
function getGridViewControl()
{
if (null == gridViewCtl)
{
gridViewCtl = document.getElementById(gridViewCtlId);
}
}
function onGridViewRowSelected(rowIdx)
{
var selRow = getSelectedRow(rowIdx);
if (curSelRow != null)
{
curSelRow.style.backgroundColor = '#ffffff';
}
if (null != selRow)
{
curSelRow = selRow;
curSelRow.style.backgroundColor = '#ff0022';
}
}
function getSelectedRow(rowIdx)
{
getGridViewControl();
if (null != gridViewCtl)
{
return gridViewCtl.rows[rowIdx];
}
return null;
}
|
|
|
|
|
Have you tryed something like a hidden field to save the rowIdx in clientside and retrieve it in the serverside?
Alexei Rodriguez
|
|
|
|
|
How would I code that? Thanks.
|
|
|
|
|
|
(a.) I am a beginner to ASP.NET and VB.NET
(b.) I created a LOGIN table with two fields "username" and "password"
(c.) The login Is allowed to only ONE ADMINISTRATOR
(d.) The login form is Home.aspx
(e.) After login it should go to Admin.aspx
(f.) Suppose the code for accesing the USERNAME field from database is below
obj.dr("username")
1. Give me a SIMPLE code for Login Button Click event
2. Give me a SIMPLE code for SignOut Button Click event
3. Give me a SIMPLE code for Checking whether if logged in during "page load event" of each forms.
|
|
|
|
|
Gjm wrote: 1. Give me a SIMPLE code for Login Button Click event
2. Give me a SIMPLE code for SignOut Button Click event
3. Give me a SIMPLE code for Checking whether if logged in during "page load event" of each forms.
Buy some Beginners Book and Read yourself. If stuck then ask, no one will provide you the source code in this way.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
USING CAPS is akin to shouting. "Give me" is imperative. It is an order.
So you are shouting orders to people to give you the code you are either (a) unable or (b) unwilling to write.
Why on Earth did you bother posting? Did you honestly expect anyone to help with an attitude like that?
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
Forget about doing all that manually, if you are new you are gonna have a hard time
Use the integrated membership functions of asp.net
Alexei Rodriguez
|
|
|
|
|
I have created One dynamically
Such as
Doctor 00.00 00.15 00.30 00.45 1.00 1.15 1.30 1.45 2.00 .....till 11.45
A medium critical medium medium medium low High
This is coming when the page loads...
now I have 2 drop down boxes using that user can select time which he wants to display..
Suppose user select between 1 to 2 Then last 4 column should come,
For this i m using this function
private void loadDynamicGrid(Int32 startTime , Int32 endTime)
{
// #region Code for preparing the DataTable
//Create an instance of DataTable
//Create an ID column for adding to the Datatable
dt = new DataTable();
DataColumn dcol = new DataColumn(ID, typeof(System.Int32));
dcol.AutoIncrement = true;
dt.Columns.Add(dcol);
DataRow drow = null;
drow = dt.NewRow();
//Add the row to the datatable.
dt.Rows.Add(drow);
foreach (DataColumn col in dt.Columns)
{
//Declare the bound field and allocate memory for the bound field.
//for (Int32 index = 0; index <= 95; index++)
//{
// BoundField bfield = new BoundField();
// Int32 var = index / 4;
// if (index % 4 == 0)
// {
// if (index < 40)
// {
// bfield.HeaderText = (index / 4) + ":00";
// }
// else
// {
// bfield.HeaderText = (index / 4) + ":00";
// }
// }
// else
// {
// bfield.HeaderText = var + ":" + ((index % 4) * 15);
// }
// //Add the newly created bound field to the GridView.
// GrdDynamic.Columns.Add(bfield);
//}
for (Int32 index = startTime; index < endTime; index++)
{
Int32 hour = index;
for (Int32 minute = 0; minute <= 3; minute++)
{
BoundField bfield = new BoundField();
bfield.HeaderText = ((hour.ToString()) +":"+ (15 * minute));
GrdDynamic.Columns.Add(bfield);
}
}
}
//Initialize the DataSource
GrdDynamic.DataSource = dt;
//Bind the datatable with the GridView.
GrdDynamic.DataBind();
}
during page load i am passing calling loadDynamicGrid(0, 24)
and on dropdown_selectIndexChange()I m calling loadDynamicGrid( 1,2)
But this is adding at the end of grid not removing other column..
How to solve this problem
but this
|
|
|
|
|
Hi there, I saw different techniques to solve FileUpload-Ajax problem. But nothing works for me.
I got a gridview showing all my products, there is a button to open my AddProduct Panel to Add New products.
If I provide all my product details it saves everything except the file(value in FileUpload) in my DB.
I tried Triggers, but it doesnt make any difference.
sample code:
if (picUpload.HasFile)
{
string strpath = Server.MapPath("../ProductPicture/");
picUpload.SaveAs(strpath + picUpload.FileName);
}
product.Picture = picUpload.FileName; //saves filename in DB
Sample Markup:
<triggers>
<asp:postbacktrigger controlid="btnAdd"/> /* button btnAdd adds form values into DB */
</triggers>
=============
|
|
|
|
|
hi,
File upload control does not work with Update panel since it doesn't support asynchronous postbacks.
It requires full post back to occur.
So use
<triggers>
<asp:postbacktrigger controlid="Button1">
within the UpdatePanel and outside of the ContentTemplate
|
|
|
|
|
I have created Grid view dynamically at run time
Suppose
Doctor 00.15 00.30 00.45 1.00
A
B
C
D
E
now if i click any cell then how can i pop up another form. so that i can save records such as name , age and age will come into the cell.
I can select multiple cells of one rows.
|
|
|
|
|
You can either make the information in the cell linked via an anchor which will call javascript in the href to pop up an ajax modal dialog, or wrap the contents in a span and add the onclick event handler to that.
Should you need to change the contents of the cell on return from the form, use javascript to change the anchor or span innerText property.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
Dim mmsg As String
Dim mto As String
Dim mfrom As String
Dim msubject As String
mto = TextBox1.Text
mfrom = TextBox2.Text
msubject = TextBox3.Text
mmsg = TextBox4.Text
Try
Dim message As New MailMessage(mfrom, mto, msubject, mmsg)
'Dim mysc As New SmtpClient(msr, mport)
Dim mysc As SmtpClient = New SmtpClient("127.0.0.1")
mysc.Port = "25"
mysc.UseDefaultCredentials = True
mysc.Send(message)
MsgBox("the messgage has been sent to '" + message.To.ToString + "' ", MsgBoxStyle.OkOnly)
Catch ex As FormatException
MsgBox("Format exception:" & ex.Message)
Catch ex As SmtpException
MsgBox("SMTP exception:" & ex.Message)
Catch ex As Exception
MsgBox("General exception:" & ex.Message)
End Try
End Sub
above code dosent put any error but email dose not send ,it stay in
C:\Inetpub\mailroot\Queue ,why so happen. Please hlep me. I tried about couple of week but i could not able to solve it.
Thanks
Dipak
|
|
|
|
|
D.K.C wrote: ,it stay in
C:\Inetpub\mailroot\Queue
Your SMTP server is not running.
|
|
|
|