|
I have provisional design I'd like some feedback on, in terms of feasibility and usability. My requirement is to allow an admin to maintain Teams within a division. One division may have zero to many teams, and each team zero to many users. Users may belong to many teams. The admin needs to be able to select a division, then add, edit, or delete teams in that division. Editing a team involves changing its name, and adding or removing users.
My initial design uses a header DropDownList, to select a division, then below that a ListBox on the left, with Users for that Division, and a TreeView on the right, with Teams as root nodes and users in teams as child nodes under the teams. Between these I have Add and Remove buttons, to add or remove users from a selected team. To the right of the teams treeview I have buttons to add, or remove a team, and to edit the team name. I don't yet know how to implement the editing of the team name.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
How to output a web control so that it can be postbacked from the page?
I write the code like this:
LinkButton btnTest = new LinkButton();<br />
btnTest.Text = "Test";<br />
btnTest.Click += new EventHandler(btnTest_Click);<br />
StringWriter sw = new StringWriter();<br />
HtmlTextWriter htw = new HtmlTextWriter(sw);<br />
btnTest.RenderControl(htw);<br />
lblTest.Text = sw.ToString();
Now the control could be outputed by HTML code,
but it cannot be postbacked from the page.
It be outputed like a normal text, not a LinkButton.
I want it can be clicked, and raise the click event.
So, what can I do for it?
|
|
|
|
|
Hi,
btnTest.PostbackUrl="specify to which u want to postback";
I hope this will suffice ur requirement.
Happy Programming.
|
|
|
|
|
No, it doesn't it!
At last, the server output the HTML's code like <a>Test</a>.
So the LinkButton cannot be clicked!!!
|
|
|
|
|
Hi,i wan to show the video in asp.net page,so am using embed object.it is working in my local machine but after hosting that page not working in my machine.am adding this code in datalist control.embed code as follows
<embed id="vd" autostart="true" src="<%# DataBinder.Eval(Container.DataItem,"VIDEO")%>"
="" controller="true" loop="false" visible="true" width="318" height="320" scale="tofit" type="video/x-ms-wmv" />
Databindcode as follows
DataTable VideoTable = new DataTable();
DataColumn VideoColumn;
VideoColumn = new DataColumn();
VideoColumn.DataType = Type.GetType("System.String");
VideoColumn.ColumnName = "VIDEO";
VideoTable.Columns.Add(VideoColumn);
foreach (string Files in Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("Video"), "*.wmv"))
{
VideoTable.Rows.Add(Files);
}
One more doubt.will the embed object work all the browsers or it is a browser specific.in my local machine it is IE6 only.if it is a browser specific which is the best solution for showing the video
|
|
|
|
|
Hi everyone,
Can anyone help me out in opening the .oft file using asp.net and vb(code-behind).
Regards,
Manowj
|
|
|
|
|
hello
i want three if codition how can run it.
in this code
if (flag == 0)
{
funSearchSecurityCode();
}
this if condition run.
this is also run---
if (drpdwnAnalystName.SelectedItem.Value == strDropdown)
{
funSearchAnalyst();
}
but in this pointer is not go inside directly go outside funStyle().
if (flag==1)
{
funSearchFromDate();
}
funStyle();
code--------
protected void btnSearch_Click1(object sender, EventArgs e)
{
string strDropdown = drpdwnAnalystName.SelectedItem.Text;
string strSecurityCode = txtSecurityCode.Text;
string strFromDate = dtpFrom.SelectedDate.ToString();
int flag = 0;
if (flag == 0)
{
funSearchSecurityCode();
}
if (drpdwnAnalystName.SelectedItem.Value == strDropdown)
{
funSearchAnalyst();
}
if (flag==1)
{
funSearchFromDate();
}
funStyle();
txtSecurityCode.Text = "";
drpdwnAnalystName.SelectedItem.Text = "";
}
Gayatri
|
|
|
|
|
Why is that subject line missing in your post?
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
First if condition getting executed implies the value of flag = 0
hence third if condition would be false and hence the inside code will not be executed.
|
|
|
|
|
I guess it can go inside only one if condition either if(flag == 0) or if(flag ==1) and since its going inside flag==0 it shows flag value is 0 then it wont go inside other if condition and its working properly.
What is ur problem?
|
|
|
|
|
but here always seen flag==0
if i will select date that time also flag==0 how?
gayatri
Gayatri
|
|
|
|
|
u r setting flag = 0 but where are u setting flag =1
U need to do that manually based on ur condition..
|
|
|
|
|
niki_nilu wrote: if (flag == 0)
{
funSearchSecurityCode();
}
this if condition run.
if flag is 0
niki_nilu wrote: if (drpdwnAnalystName.SelectedItem.Value == strDropdown)
{
funSearchAnalyst();
}
if drpdwnAnalystName.SelectedItem.Value is equal strDropdown
niki_nilu wrote: but in this pointer is not go inside directly go outside funStyle().
if (flag==1)
{
funSearchFromDate();
}
funStyle();
Becouse flag is not 1. it is 0
What you want to do?
bEst rEGard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
when i will select date that time i want to run last if condition.
gayatri
Gayatri
|
|
|
|
|
niki_nilu wrote: when i will select date that time i want to run last if condition.
then set flag=1
for example
if(txtLastDate.Text!="")
{
flag=1
}
else
{
flag=0
}
if(flag==0)
{
}
else if(dd.selectedvalue==......)
{
}
else
{
}
}
}
bEst rEgard
please don't forget to vote on the post that helped you.
|
|
|
|
|
The above code which u have posted how u think that flag value change with 1. I don't think so it will satisfied the condition flag==1.Think about that.
Devjit Das
|
|
|
|
|
Hai,
How to avoid refreshing using timer control for a client side code.We create a javascript code to disable a grid row.Due to timer control the row will be enabled after the time interval.How we stop refreshing for the client side code.
|
|
|
|
|
Findout where that B... code is lying in your application and delete it immediately.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Its working fine iam retrieving images, but ....
For example : customer may upload 2 - 3 product details with image so we have 10 options to image upload.
So the condition is given like if i click button in new page by checking for karnataka state than all the product pictures should be displayed. because the condition iam checking for karnataka(like that i have to create 26 stats)
here iam receiving all the images as same.(it should be come different images according to that respective products.
krishna
|
|
|
|
|
Your question doesn't really make sense. Are you saying that every product is being rendered with the same image? If so, how are you rendering the images? Check how the URLs are being constructed. You would need to post your code if you want further assistance.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Each and every product having different images, but iam receiving all same images, if i go for the condition.
Html code :
<asp:image id="im1" runat="server"> <asp:image id="im2" runat="server"> <asp:image id="im3" runat="server"> code Behind :
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd10 = new SqlCommand("select * from onlinegoa2 where state='Karnataka'", con);
SqlDataReader dr10 = cmd10.ExecuteReader();
while (dr10.Read())
{
string x = dr10[4].ToString();
string FileName = x.ToString();
im1.ImageUrl = "./uploads/" + FileName;
}
con.Close();
con.Open();
SqlCommand cmd11 = new SqlCommand("select * from onlinegoa2 where state='Karnataka'",con);
SqlDataReader dr11 = cmd11.ExecuteReader();
while(dr11.Read())
{
string bb = dr11[6].ToString();
string FileName1 = bb.ToString();
im2.ImageUrl = "./uploads/" + FileName1;
}
krishna
|
|
|
|
|
krishnavaradharajan wrote: while (dr10.Read())
{
string x = dr10[4].ToString();
string FileName = x.ToString();
im1.ImageUrl = "./uploads/" + FileName;
}
For each iteration of the loop, you are changing the ImageUrl property of the same object. You need to update the object reference im1 for each iteration of the loop so that it points to the image object that corresponds to the current row of data.
It would be better to use a data-bound control like a Repeater and declaratively define data binding expressions in the template designer.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hello sir
i have one problem in if condition.
in this code first two if condition is run but lastone is not run.
in debugging i saw the pointer is not go to inside { brackets.
it directly go to funStyle().
so guide me write way.
code--------
protected void btnSearch_Click1(object sender, EventArgs e)
{
string strDropdown = drpdwnAnalystName.SelectedItem.Text;
string strSecurityCode = txtSecurityCode.Text;
string strFromDate = dtpFrom.Text;
int flag = 0;
if (flag == 0)
{
funSearchSecurityCode();
}
if (drpdwnAnalystName.SelectedItem.Value == strDropdown
{
funSearchAnalyst();
}
if (dtpFrom.Text == strFromDate
{
funSearchFromDate();
}
funStyle();
txtSecurityCode.Text = "";
drpdwnAnalystName.SelectedItem.Text = "";
}
Gayatri
|
|
|
|
|
niki_nilu wrote: funSearchAnalyst();
Hi,
here in this function are you getting any exception ? check it out and
niki_nilu wrote: if (drpdwnAnalystName.SelectedItem.Value == strDropdown missong braket ??????
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
Your second and third if conditions are missing their trailing parentheses. I presume this is a typo, otherwise your code wouldn't compile.
funSearchFromDate() will only be executed if dtpFrom.Text and strFromData are equal. This comparision is case-sensitive; use String.Compare if you want to do a case-insensitive comparison.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|